mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Fix (partly?) bug #6451: Crash when interacting with buffer-dependent dialog with no buffer open.
It seems to be a good idea to close all buffer-dependent dialogs when there are no more buffers open. This gives the user no opportunity to call buffer-related functions and cause a crash. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33015 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
23b672f83c
commit
c37bef4127
@ -3376,8 +3376,12 @@ void GuiView::updateDialogs()
|
|||||||
|
|
||||||
for(; it != end; ++it) {
|
for(; it != end; ++it) {
|
||||||
Dialog * dialog = it->second.get();
|
Dialog * dialog = it->second.get();
|
||||||
if (dialog && dialog->isVisibleView())
|
if (dialog) {
|
||||||
dialog->checkStatus();
|
if (dialog->isBufferDependent() && !documentBufferView())
|
||||||
|
hideDialog(fromqstr(dialog->name()), 0);
|
||||||
|
else if (dialog->isVisibleView())
|
||||||
|
dialog->checkStatus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
updateToolbars();
|
updateToolbars();
|
||||||
updateLayoutList();
|
updateLayoutList();
|
||||||
|
Loading…
Reference in New Issue
Block a user