From: johanengelen Date: Mon, 2 Jun 2008 19:53:18 +0000 (+0000) Subject: check if item is LPEItem before casting!!! should fix bug 236788 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b0d55dfbee24f3fc215068de30c42b11c122eda9;p=inkscape.git check if item is LPEItem before casting!!! should fix bug 236788 --- 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);