summaryrefslogtreecommitdiffstats
path: root/src/selection.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-01-08 20:57:01 +0000
committerMartin Owens <doctormo@gmail.com>2014-01-08 20:57:01 +0000
commit4f797dec1d4a48a21509ae83562f5521467bc6ac (patch)
treeea1a033ba5c75fa18116fbd91cea1030af61d753 /src/selection.cpp
parentPrevent infinite loop with bad input. (diff)
downloadinkscape-4f797dec1d4a48a21509ae83562f5521467bc6ac.tar.gz
inkscape-4f797dec1d4a48a21509ae83562f5521467bc6ac.zip
Change my mind on the solution to the bug, protect all selection additions.
Fixed bugs: - https://launchpad.net/bugs/168695 (bzr r12894)
Diffstat (limited to 'src/selection.cpp')
-rw-r--r--src/selection.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/selection.cpp b/src/selection.cpp
index 7c696daf0..17b7253f2 100644
--- a/src/selection.cpp
+++ b/src/selection.cpp
@@ -154,6 +154,7 @@ bool Selection::includes(SPObject *obj) const {
void Selection::add(SPObject *obj, bool persist_selection_context/* = false */) {
g_return_if_fail(obj != NULL);
g_return_if_fail(SP_IS_OBJECT(obj));
+ g_return_if_fail(obj->document != NULL);
if (includes(obj)) {
return;