diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-04-01 17:31:17 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-04-01 17:31:17 +0000 |
| commit | b2047458dfe4c048cd6aae8a03d9969b650d9a7b (patch) | |
| tree | 345fa7c16a58f32191987c4063d2bf6a51e56c26 /src | |
| parent | suppress warning when closing second document (diff) | |
| download | inkscape-b2047458dfe4c048cd6aae8a03d9969b650d9a7b.tar.gz inkscape-b2047458dfe4c048cd6aae8a03d9969b650d9a7b.zip | |
suppress warnings when closing a desktop but not program
(bzr r5294)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/sp-canvas.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 357d6ade7..d528f05e2 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1146,6 +1146,10 @@ sp_canvas_unrealize (GtkWidget *widget) { SPCanvas *canvas = SP_CANVAS (widget); + canvas->current_item = NULL; + canvas->grabbed_item = NULL; + canvas->focused_item = NULL; + shutdown_transients (canvas); gdk_gc_destroy (canvas->pixmap_gc); @@ -1539,6 +1543,9 @@ sp_canvas_motion (GtkWidget *widget, GdkEventMotion *event) if (event->window != SP_CANVAS_WINDOW (canvas)) return FALSE; + if (canvas->pixmap_gc == NULL) // canvas being deleted + return FALSE; + if (canvas->grabbed_event_mask & GDK_POINTER_MOTION_HINT_MASK) { gint x, y; gdk_window_get_pointer (widget->window, &x, &y, NULL); @@ -2010,7 +2017,7 @@ paint (SPCanvas *canvas) static int do_update (SPCanvas *canvas) { - if (!canvas->root) // canvas may have already be destroyed by closing desktop durring interrupted display! + if (!canvas->root || !canvas->pixmap_gc) // canvas may have already be destroyed by closing desktop durring interrupted display! return TRUE; /* Cause the update if necessary */ |
