From a705cc22a15beab3ba8c25b67d70a9fa55607893 Mon Sep 17 00:00:00 2001 From: Michael Wybrow Date: Fri, 13 Aug 2010 18:39:11 +1000 Subject: Fixes bug #590047: assertion crash in libavoid when marking shapes as not being avoided by the connector context. Fixed bugs: - https://launchpad.net/bugs/590047 (bzr r9708.1.1) --- src/conn-avoid-ref.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/conn-avoid-ref.cpp') diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 88c84a84c..a918f8745 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -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; } -- cgit v1.2.3