From: johncoswell Date: Sun, 16 Dec 2007 15:29:30 +0000 (+0000) Subject: fix possible crash where event_context is destroyed during fill operation due to... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ac7732e6b389dd4acd57bb381cf58701a68c2458;p=inkscape.git fix possible crash where event_context is destroyed during fill operation due to tool switch --- diff --git a/src/flood-context.cpp b/src/flood-context.cpp index 86f6687e3..5838c2b59 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -1044,7 +1044,7 @@ static gint sp_flood_context_root_handler(SPEventContext *event_context, GdkEven event_context->xp = (gint) button_w[NR::X]; event_context->yp = (gint) button_w[NR::Y]; event_context->within_tolerance = true; - + dragging = true; NR::Point const p(desktop->w2d(button_w)); @@ -1100,7 +1100,10 @@ static gint sp_flood_context_root_handler(SPEventContext *event_context, GdkEven } r->stop(); - event_context->defaultMessageContext()->clear(); + + if (SP_IS_EVENT_CONTEXT(event_context)) { + event_context->defaultMessageContext()->clear(); + } } } break;