Do not access current_view_ if it is NULL

Spotted by Coverity scan.
This commit is contained in:
Jean-Marc Lasgouttes 2024-09-09 15:35:57 +02:00
parent 3d323412ad
commit ffde470363

View File

@ -1902,6 +1902,7 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
// set default
arg = "templates";
if (arg != "templates" && arg != "examples") {
if (current_view_)
current_view_->message(_("Wrong argument. Must be 'examples' or 'templates'."));
break;
}