From a9e9e03ce94e5b27f4c9d344f292ed326322393e Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Fri, 20 Feb 2009 19:36:19 +0000 Subject: [PATCH] branch: Fix a crash when removing the label of an included Program Listing. See also: http://www.lyx.org/trac/changeset/28563 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@28570 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetInclude.cpp | 5 +++-- status.16x | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index f2a55d6420..0f3c500afc 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -243,9 +243,10 @@ void InsetInclude::doDispatch(Cursor & cur, FuncRequest & cmd) docstring old_label; if (label_) old_label = label_->getParam("name"); - if (new_label.empty()) + if (new_label.empty()) { delete label_; - else if (label_ && old_label != new_label) { + label_ = 0; + } else if (label_ && old_label != new_label) { label_->updateCommand(new_label); // the label might have been adapted (duplicate) if (new_label != label_->getParam("name")) { diff --git a/status.16x b/status.16x index 720474d0ea..727b66ec32 100644 --- a/status.16x +++ b/status.16x @@ -180,6 +180,8 @@ What's new - Fix a crash when pressing the Update button of the Citation dialog for read-only documents (bug 5785). + +- Fix a crash when removing the label of an included Program Listing. - Ignore the master_buffer setting in Document>Settings if the current document is no real child. This fixes a crash when using the outliner