summaryrefslogtreecommitdiff
path: root/src/gui/itemcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r--src/gui/itemcontainer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index 3f00f9eb..0cdb8864 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -42,10 +42,8 @@ ItemContainer::ItemContainer(Inventory *inventory):
mInventory(inventory)
{
ResourceManager *resman = ResourceManager::getInstance();
- Image *itemImg = resman->getImage("graphics/sprites/items.png");
- if (!itemImg) logger->error("Unable to load items.png");
- itemset = new Spriteset(itemImg, 32, 32);
- itemImg->decRef();
+ itemset = resman->createSpriteset("graphics/sprites/items.png", 32, 32);
+ if (!itemset) logger->error("Unable to load items.png");
selImg = resman->getImage("graphics/gui/selection.png");
if (!selImg) logger->error("Unable to load selection.png");