X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-switch.cpp;h=d7bc6bba0a4eadd2da4f0b25918ec8cafde046ad;hb=2c9c6838241516364d68db0d30520e18f70fc70d;hp=64aa868ccd1f39611b395fad99bc3eb8ade5729b;hpb=35e0418c921e7057987f57ba30ba95ec5e03c9e5;p=inkscape.git diff --git a/src/sp-switch.cpp b/src/sp-switch.cpp index 64aa868cc..d7bc6bba0 100644 --- a/src/sp-switch.cpp +++ b/src/sp-switch.cpp @@ -71,7 +71,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;