From 496451c164af0b2e90c5b7a155a101ed55472e52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Wed, 8 Feb 2012 11:49:23 +0100 Subject: [PATCH] itemdef: handle the !render-to-target case --- src/itemdef.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/itemdef.cpp b/src/itemdef.cpp index aa888bbd..22ca9f08 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]); + } } /* -- 2.30.2