From 202abf876bc54c0f82c1afcd26b3b79fd1cd4815 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 31 Aug 2016 11:30:26 +0300 Subject: [PATCH] Allow an empty graphic to be specified in part definitions It can be used to cancel out a graphic for specific states. --- source/part.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/part.cpp b/source/part.cpp index 4726b4c..72c8921 100644 --- a/source/part.cpp +++ b/source/part.cpp @@ -65,7 +65,7 @@ void Part::Loader::graphic_normal(const string &n) void Part::Loader::graphic(State s, const string &n) { - Graphic *grph = &get_collection().get(n); + Graphic *grph = (n.empty() ? 0 : &get_collection().get(n)); for(int i=0; i