Code

Fixes bug #590047: assertion crash in libavoid when marking shapes as not
authorMichael Wybrow <mjwybrow@users.sf.net>
Fri, 13 Aug 2010 08:39:11 +0000 (18:39 +1000)
committerMichael Wybrow <mjwybrow@users.sf.net>
Fri, 13 Aug 2010 08:39:11 +0000 (18:39 +1000)
being avoided by the connector context.

src/conn-avoid-ref.cpp

index 88c84a84c449333d5d18cc94d3fcf10ff53e1547..a918f8745903f3dfeea95cb9fdc9593de80647f4 100644 (file)
@@ -63,8 +63,8 @@ SPAvoidRef::~SPAvoidRef()
     const bool routerInstanceExists = (item->document->router != NULL);
 
     if (shapeRef && routerInstanceExists) {
-        Router *router = shapeRef->router();
-        router->removeShape(shapeRef);
+        // Deleting the shapeRef will remove it completely from 
+        // an existing Router instance.
         delete shapeRef;
     }
     shapeRef = NULL;
@@ -329,7 +329,8 @@ void SPAvoidRef::handleSettingChange(void)
     {
         g_assert(shapeRef);
 
-        router->removeShape(shapeRef);
+        // Deleting the shapeRef will remove it completely from 
+        // an existing Router instance.
         delete shapeRef;
         shapeRef = NULL;
     }