From 7346ca4eb85e7ef879a64ea3c78ec10a20635971 Mon Sep 17 00:00:00 2001 From: mental Date: Thu, 10 May 2007 01:19:01 +0000 Subject: [PATCH] add document to action events (when possible) --- src/helper/action.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); } -- 2.30.2