Code

Avoid crash by uninitialized perspectives.
[inkscape.git] / src / gc-anchored.cpp
index 3f4cfc12dcf8cbe1a3022882495dbfe451f480f5..91055c968259493cd9ca562c6b9207bf07308b51 100644 (file)
@@ -72,6 +72,7 @@ void Anchored::anchor() const {
 
 void Anchored::release() const {
     Debug::EventTracker<ReleaseEvent> tracker(this);
+    g_return_if_fail(_anchor);
     if (!--_anchor->refcount) {
         _free_anchor(_anchor);
         _anchor = NULL;