From: mental Date: Thu, 10 May 2007 01:19:01 +0000 (+0000) Subject: add document to action events (when possible) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7346ca4eb85e7ef879a64ea3c78ec10a20635971;p=inkscape.git add document to action events (when possible) --- diff --git a/src/helper/action.cpp b/src/helper/action.cpp index 9b8cbfce8..84d150615 100644 --- a/src/helper/action.cpp +++ b/src/helper/action.cpp @@ -131,9 +131,11 @@ public: : ActionEventBase(share_static_string("action")) { _addProperty(share_static_string("timestamp"), timestamp()); - SPDocument *document = action->view->doc(); - if (document) { - _addProperty(share_static_string("document"), document->serial()); + if (action->view) { + SPDocument *document = action->view->doc(); + if (document) { + _addProperty(share_static_string("document"), document->serial()); + } } _addProperty(share_static_string("verb"), action->id); }