summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/popups/itempopup.cpp2
-rw-r--r--src/gui/widgets/icon.h4
-rw-r--r--src/gui/windows/itemamountwindow.cpp3
3 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 28de3b641..9c0607a2f 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -71,7 +71,7 @@ ItemPopup::ItemPopup() :
mItemCards(new TextBox(this)),
mItemOptions(new TextBox(this)),
mItemType(ItemDbType::UNUSABLE),
- mIcon(new Icon(this, nullptr)),
+ mIcon(new Icon(this, nullptr, AutoRelease_false)),
mLastName(),
mCardsStr(),
mItemOptionsStr(),
diff --git a/src/gui/widgets/icon.h b/src/gui/widgets/icon.h
index f0849d505..8d7bdc13e 100644
--- a/src/gui/widgets/icon.h
+++ b/src/gui/widgets/icon.h
@@ -44,14 +44,14 @@ class Icon final : public Widget
*/
Icon(const Widget2 *const widget,
const std::string &filename,
- const AutoRelease autoRelease = AutoRelease_false);
+ const AutoRelease autoRelease);
/**
* Constructor, uses an existing Image.
*/
Icon(const Widget2 *const widget,
Image *const image,
- const AutoRelease autoRelease = AutoRelease_false);
+ const AutoRelease autoRelease);
A_DELETE_COPY(Icon)
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 41916c514..75a2361bf 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -139,7 +139,8 @@ ItemAmountWindow::ItemAmountWindow(const ItemAmountWindowUsageT usage,
mItemPriceTextField(nullptr),
mGPLabel(nullptr),
mItem(item),
- mItemIcon(new Icon(this, item != nullptr ? item->getImage() : nullptr)),
+ mItemIcon(new Icon(this,
+ item != nullptr ? item->getImage() : nullptr, AutoRelease_false)),
mItemAmountSlide(new Slider(this, 1.0, maxRange, 1.0)),
mItemPriceSlide(nullptr),
mItemDropDown(nullptr),