diff options
Diffstat (limited to 'engines/teenagent/inventory.cpp')
-rw-r--r-- | engines/teenagent/inventory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index ebefa9dd8c..3e04dcdd7e 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -40,11 +40,11 @@ void Inventory::init(TeenAgentEngine *engine) { varia.open("varia.res"); { - Common::SeekableReadStream *s = varia.getStream(3); - assert(s != NULL); + Common::ScopedPtr<Common::SeekableReadStream> s(varia.getStream(3)); + if (!s) + error("no inventory background"); debug(0, "loading inventory background..."); background.load(s, Surface::kTypeOns); - delete s; } uint32 items_size = varia.getSize(4); |