From: knutux Date: Fri, 21 Apr 2006 07:11:19 +0000 (+0000) Subject: Bug-1474013 - switch works incorrectly with non SP_ITEM children X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3939f34d9df2aef21467a26a63983ea72d8047f4;p=inkscape.git Bug-1474013 - switch works incorrectly with non SP_ITEM children --- 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;