summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/select-tool.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-01-08 20:43:58 +0000
committerMartin Owens <doctormo@gmail.com>2014-01-08 20:43:58 +0000
commit68c1ef5d80c60fcca9364b551067773d5375774f (patch)
tree7af316284ddd21bdab3b6e95f05c23e1e999c17b /src/ui/tools/select-tool.cpp
parentfix "set but ununused" warning (diff)
downloadinkscape-68c1ef5d80c60fcca9364b551067773d5375774f.tar.gz
inkscape-68c1ef5d80c60fcca9364b551067773d5375774f.zip
Make damn sure the item hasn't been deleted before adding it.
Fixed bugs: - https://launchpad.net/bugs/168695 (bzr r12891)
Diffstat (limited to 'src/ui/tools/select-tool.cpp')
-rw-r--r--src/ui/tools/select-tool.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/tools/select-tool.cpp b/src/ui/tools/select-tool.cpp
index 498882417..94f700ebb 100644
--- a/src/ui/tools/select-tool.cpp
+++ b/src/ui/tools/select-tool.cpp
@@ -692,7 +692,8 @@ bool SelectTool::root_handler(GdkEvent* event) {
}
} else { // simple or shift click, no previous selection
_seltrans->resetState();
- selection->set(this->item);
+ if(this->item && this->item->document)
+ selection->set(this->item);
}
}