From: Mikko Rasa Date: Wed, 31 Aug 2016 08:30:26 +0000 (+0300) Subject: Allow an empty graphic to be specified in part definitions X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=commitdiff_plain;h=202abf876bc54c0f82c1afcd26b3b79fd1cd4815 Allow an empty graphic to be specified in part definitions It can be used to cancel out a graphic for specific states. --- 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