From 80ee8504c6c33ebdbf25f1dbbae8f73864c644d3 Mon Sep 17 00:00:00 2001 From: Andrius Ramanauskas Date: Fri, 21 Apr 2006 07:11:19 +0000 Subject: Bug-1474013 - switch works incorrectly with non SP_ITEM children (bzr r561) --- src/sp-switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp-switch.cpp') 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; -- cgit v1.2.3