From: Michael Wybrow Date: Fri, 13 Aug 2010 07:39:25 +0000 (+1000) Subject: Fixes bug #478597 where the connector context crash due to asserting that X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1b82a108e1fafe2823458754f17dcf0ed5da8077;p=inkscape.git Fixes bug #478597 where the connector context crash due to asserting that paths marked as connectors were always open. Now it just treats them as connectors if they are open, or normal objects otherwise. --- diff --git a/src/connector-context.cpp b/src/connector-context.cpp index 1263a9215..f862abac4 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -1908,8 +1908,10 @@ static bool cc_item_is_shape(SPItem *item) bool cc_item_is_connector(SPItem *item) { if (SP_IS_PATH(item)) { - if (SP_PATH(item)->connEndPair.isAutoRoutingConn()) { - g_assert( SP_PATH(item)->original_curve ? !(SP_PATH(item)->original_curve->is_closed()) : !(SP_PATH(item)->curve->is_closed()) ); + bool closed = SP_PATH(item)->original_curve ? SP_PATH(item)->original_curve->is_closed() : SP_PATH(item)->curve->is_closed(); + if (SP_PATH(item)->connEndPair.isAutoRoutingConn() && !closed) { + // To be considered a connector, an object must be a non-closed + // path that is marked with a "inkscape:connector-type" attribute. return true; } }