Code

* src/Makefile_insert, src/Makefile.am, src/svg/Makefile_insert,
[inkscape.git] / src / sp-switch.cpp
index 64aa868ccd1f39611b395fad99bc3eb8ade5729b..6884c352f170125389ce4523262ea3eea5dd6d8e 100644 (file)
@@ -15,9 +15,7 @@
 # include "config.h"
 #endif
 
-#if defined(WIN32) || defined(__APPLE__)
-# include <glibmm/i18n.h>
-#endif
+#include <glibmm/i18n.h>
 
 #include "sp-switch.h"
 #include "display/nr-arena-group.h"
@@ -71,7 +69,7 @@ CSwitch::~CSwitch() {
 
 SPObject *CSwitch::_evaluateFirst() {
     for (SPObject *child = sp_object_first_child(_group) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) {
-        if (sp_item_evaluate(SP_ITEM(child)))
+        if (SP_IS_ITEM(child) && sp_item_evaluate(SP_ITEM(child)))
             return child;
     }
     return NULL;