Code

fix crash: connections were not disconnected on destruction
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 21 Sep 2008 18:37:10 +0000 (18:37 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 21 Sep 2008 18:37:10 +0000 (18:37 +0000)
src/document-subset.cpp

index 04b3d9b0629cdc22965e88bb1cc0ef185b121b1e..aa4046d864605f112fdbdb157281cd3548bab46c 100644 (file)
@@ -140,8 +140,12 @@ struct DocumentSubset::Relations : public GC::Managed<GC::ATOMIC>,
         for ( Map::iterator iter=records.begin()
             ; iter != records.end() ; ++iter )
         {
-            if ((*iter).first)
+            if ((*iter).first) {
                 sp_object_unref((*iter).first);
+                Record &record=(*iter).second;
+                record.release_connection.disconnect();
+                record.position_changed_connection.disconnect();
+            }
         }
     }