summaryrefslogtreecommitdiff
path: root/src/gui/shoplistbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/shoplistbox.cpp')
-rw-r--r--src/gui/shoplistbox.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp
index f5581323..4821067c 100644
--- a/src/gui/shoplistbox.cpp
+++ b/src/gui/shoplistbox.cpp
@@ -89,7 +89,11 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
if (mShopItems)
{
- graphics->drawImage(mShopItems->at(i).image, 1, y);
+ Image *icon = mShopItems->at(i).image;
+ if (icon)
+ {
+ graphics->drawImage(icon, 1, y);
+ }
}
graphics->drawText(mListModel->getElementAt(i), ITEM_ICON_SIZE + 5,
y + (ITEM_ICON_SIZE - getFont()->getHeight()) / 2);