Code

suppress warning when closing second document
authorbuliabyak <buliabyak@users.sourceforge.net>
Tue, 1 Apr 2008 17:30:06 +0000 (17:30 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Tue, 1 Apr 2008 17:30:06 +0000 (17:30 +0000)
src/document-subset.cpp

index 5fcf1641cf80d26052816317ed244686e845bcd6..04b3d9b0629cdc22965e88bb1cc0ef185b121b1e 100644 (file)
@@ -140,7 +140,8 @@ struct DocumentSubset::Relations : public GC::Managed<GC::ATOMIC>,
         for ( Map::iterator iter=records.begin()
             ; iter != records.end() ; ++iter )
         {
-            sp_object_unref((*iter).first);
+            if ((*iter).first)
+                sp_object_unref((*iter).first);
         }
     }