Commit 8dfe6ae3 authored by Martin Owens's avatar Martin Owens 🤖

Better fix using ref pattern

parent d076f7df
......@@ -511,13 +511,15 @@ void SPObject::cropToObject(SPObject *except)
if (child.isAncestorOf(except)) {
child.cropToObject(except);
} else if(&child != except) {
sp_object_ref(&child, nullptr);
toDelete.push_back(&child);
}
}
}
for (auto & i : toDelete) {
// Propergating signals here causes crashes (#227)
i->deleteObject(false);
i->deleteObject(true, true);
sp_object_unref(i, nullptr);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment