diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/sp-canvas.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 20ad27bf5..c717bc7ae 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -905,9 +905,12 @@ void SPCanvasGroup::add(SPCanvasItem *item) void SPCanvasGroup::remove(SPCanvasItem *item) { - g_return_if_fail(item != NULL); - items.remove(item); + + auto position = std::find(items.begin(), items.end(), item); + if (position != items.end()) { + items.erase(position); + } // Unparent the child item->parent = NULL; |
