From 6777466eda0b6952746a7bfb443d5e773857185a Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sat, 3 Aug 2013 23:39:12 +0200 Subject: reduce variable scope (bzr r12464) --- src/shape-editor.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/shape-editor.cpp') diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index f2339770c..71018d89b 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -46,15 +46,13 @@ ShapeEditor::~ShapeEditor() { } void ShapeEditor::unset_item(SubType type, bool keep_knotholder) { - Inkscape::XML::Node *old_repr = NULL; - switch (type) { case SH_NODEPATH: // defunct break; case SH_KNOTHOLDER: if (this->knotholder) { - old_repr = this->knotholder->repr; + Inkscape::XML::Node *old_repr = this->knotholder->repr; if (old_repr && old_repr == knotholder_listener_attached_for) { sp_repr_remove_listener_by_data(old_repr, this); Inkscape::GC::release(old_repr); -- cgit v1.2.3