From 3939f34d9df2aef21467a26a63983ea72d8047f4 Mon Sep 17 00:00:00 2001 From: knutux Date: Fri, 21 Apr 2006 07:11:19 +0000 Subject: [PATCH] Bug-1474013 - switch works incorrectly with non SP_ITEM children --- src/sp-switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2