summaryrefslogtreecommitdiffstats
path: root/src/helper/action.cpp
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2007-05-10 01:19:01 +0000
committermental <mental@users.sourceforge.net>2007-05-10 01:19:01 +0000
commit2fb6dc0eb9e2061f6e036cdd2b8ba842d07ac115 (patch)
tree090bf0ff0507377839e1e06820e141040fa4b0bb /src/helper/action.cpp
parentadd document to action events (diff)
downloadinkscape-2fb6dc0eb9e2061f6e036cdd2b8ba842d07ac115.tar.gz
inkscape-2fb6dc0eb9e2061f6e036cdd2b8ba842d07ac115.zip
add document to action events (when possible)
(bzr r2997)
Diffstat (limited to 'src/helper/action.cpp')
-rw-r--r--src/helper/action.cpp8
1 files 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);
}