mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix crash when calling dialog-show with bogus names (#12873).
This commit is contained in:
parent
f59209d31e
commit
5936076181
@ -5310,14 +5310,17 @@ Dialog * GuiView::findOrBuild(string const & name, bool hide_it)
|
||||
return dialog;
|
||||
|
||||
dialog = build(name);
|
||||
d.dialogs_[name].reset(dialog);
|
||||
// Force a uniform style for group boxes
|
||||
// On Mac non-flat works better, on Linux flat is standard
|
||||
flatGroupBoxes(dialog->asQWidget(), guiApp->platformName() != "cocoa");
|
||||
if (lyxrc.allow_geometry_session)
|
||||
dialog->restoreSession();
|
||||
if (hide_it)
|
||||
dialog->hideView();
|
||||
if (dialog) {
|
||||
|
||||
d.dialogs_[name].reset(dialog);
|
||||
// Force a uniform style for group boxes
|
||||
// On Mac non-flat works better, on Linux flat is standard
|
||||
flatGroupBoxes(dialog->asQWidget(), guiApp->platformName() != "cocoa");
|
||||
if (lyxrc.allow_geometry_session)
|
||||
dialog->restoreSession();
|
||||
if (hide_it)
|
||||
dialog->hideView();
|
||||
}
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user