mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix a crash when removing the label of an included Program Listing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28563 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3373aa588c
commit
bc5bc24812
@ -244,9 +244,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")) {
|
||||
|
Loading…
Reference in New Issue
Block a user