Code

* src/conn-avoid-ref.cpp: Fix a crash where avoided items with an empty
authormjwybrow <mjwybrow@users.sourceforge.net>
Tue, 10 Apr 2007 06:54:01 +0000 (06:54 +0000)
committermjwybrow <mjwybrow@users.sourceforge.net>
Tue, 10 Apr 2007 06:54:01 +0000 (06:54 +0000)
    bounding box would crash in their move callback.  Fixes #1694094.

src/conn-avoid-ref.cpp

index 540e8205fbbf191e093619c4e60e601c3faa5fa7..864eadbbab51a52b1036dcca4f2959e5970da4f3 100644 (file)
@@ -94,11 +94,11 @@ void SPAvoidRef::handleSettingChange(void)
     
     _transformed_connection.disconnect();
     if (new_setting) {
-        _transformed_connection = item->connectTransformed(
-                sigc::ptr_fun(&avoid_item_move));
-
         Avoid::Polygn poly = avoid_item_poly(item);
         if (poly.pn > 0) {
+            _transformed_connection = item->connectTransformed(
+                    sigc::ptr_fun(&avoid_item_move));
+
             const char *id = SP_OBJECT_REPR(item)->attribute("id");
             g_assert(id != NULL);