From b0d55dfbee24f3fc215068de30c42b11c122eda9 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Mon, 2 Jun 2008 19:53:18 +0000 Subject: [PATCH] check if item is LPEItem before casting!!! should fix bug 236788 --- src/object-edit.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/object-edit.cpp b/src/object-edit.cpp index ecd6227f4..dedcfdabf 100644 --- a/src/object-edit.cpp +++ b/src/object-edit.cpp @@ -76,9 +76,11 @@ static SPKnotHolder *sp_lpe_knot_holder(SPItem *item, SPDesktop *desktop) SPKnotHolder * sp_item_knot_holder(SPItem *item, SPDesktop *desktop) { - if (sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)) && - sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item))->isVisible() && - sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item))->providesKnotholder()) { + if ( SP_IS_LPE_ITEM(item) && + sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)) && + sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item))->isVisible() && + sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item))->providesKnotholder() ) + { return sp_lpe_knot_holder(item, desktop); } else if (SP_IS_RECT(item)) { return sp_rect_knot_holder(item, desktop); -- 2.30.2