Code

fix another crash on exit caused by trying to do stuff when canvas is no more
authorbuliabyak <buliabyak@users.sourceforge.net>
Mon, 13 Nov 2006 08:50:14 +0000 (08:50 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Mon, 13 Nov 2006 08:50:14 +0000 (08:50 +0000)
src/display/sp-canvas.cpp

index 71e4d955df8f5fdd3175a65ee1d8731692251b53..3247a3e1f6692df3d3bcc2b254021573f79dbf3f 100644 (file)
@@ -1276,6 +1276,9 @@ pick_current_item (SPCanvas *canvas, GdkEvent *event)
     int button_down = 0;
     double x, y;
 
+    if (!canvas->root) // canvas may have already be destroyed by closing desktop durring interrupted display!
+        return FALSE;
+
     int retval = FALSE;
 
     if (canvas->gen_all_enter_events == false) {