From 496451c164af0b2e90c5b7a155a101ed55472e52 Mon Sep 17 00:00:00 2001 From: Jonathan Neuschäfer Date: Wed, 8 Feb 2012 11:49:23 +0100 Subject: itemdef: handle the !render-to-target case --- src/itemdef.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/itemdef.cpp') diff --git a/src/itemdef.cpp b/src/itemdef.cpp index aa888bbdf..22ca9f088 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -417,7 +417,13 @@ public: light_position, light_color, light_radius); - // Note: might have returned NULL + + // render-to-target didn't work + if(def->inventory_texture == NULL) + { + def->inventory_texture = + tsrc->getTextureRaw(f.tname_tiles[0]); + } } /* -- cgit v1.2.3