mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Do not access current_view_ if it is NULL
Spotted by Coverity scan.
This commit is contained in:
parent
3d323412ad
commit
ffde470363
@ -1902,7 +1902,8 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
// set default
|
||||
arg = "templates";
|
||||
if (arg != "templates" && arg != "examples") {
|
||||
current_view_->message(_("Wrong argument. Must be 'examples' or 'templates'."));
|
||||
if (current_view_)
|
||||
current_view_->message(_("Wrong argument. Must be 'examples' or 'templates'."));
|
||||
break;
|
||||
}
|
||||
lyx::dispatch(FuncRequest(LFUN_DIALOG_SHOW, "lyxfiles " + arg));
|
||||
|
Loading…
Reference in New Issue
Block a user