From d4c92eb19b82184433aee3f941fb97b2f4818027 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Tue, 29 Apr 2014 19:22:37 -0400 Subject: Fix bug #1290573 and #1310802 (bzr r13323) --- src/verbs.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index ab6c25973..eee7aef75 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1372,6 +1372,10 @@ void LayerVerb::perform(SPAction *action, void *data) survivor = Inkscape::previous_layer(dt->currentRoot(), old_layer); } + if (survivor == old_layer->lastChild()) { + //oops: layer_fns messed up. BADLY. + survivor = NULL; + } // Deleting the old layer before switching layers is a hack to trigger the // listeners of the deletion event (as happens when old_layer is deleted using the // xml editor). See -- cgit v1.2.3