mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
#9875 add checks for having a current_view_ before using it
This commit is contained in:
parent
95e600cc16
commit
6bac894042
@ -2160,6 +2160,7 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
|
|||||||
// must not be inserted (#5704)
|
// must not be inserted (#5704)
|
||||||
if (!isPrintable(encoded_last_key)) {
|
if (!isPrintable(encoded_last_key)) {
|
||||||
LYXERR(Debug::KEY, "Non-printable character! Omitting.");
|
LYXERR(Debug::KEY, "Non-printable character! Omitting.");
|
||||||
|
if (current_view_)
|
||||||
current_view_->restartCursor();
|
current_view_->restartCursor();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2173,9 +2174,12 @@ void GuiApplication::processKeySym(KeySymbol const & keysym, KeyModifier state)
|
|||||||
#if defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN)
|
#if defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN)
|
||||||
&& !(state & AltModifier && state & ControlModifier)
|
&& !(state & AltModifier && state & ControlModifier)
|
||||||
#endif
|
#endif
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
|
if (current_view_) {
|
||||||
current_view_->message(_("Unknown function."));
|
current_view_->message(_("Unknown function."));
|
||||||
current_view_->restartCursor();
|
current_view_->restartCursor();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Since all checks above were passed, we now really have text that
|
// Since all checks above were passed, we now really have text that
|
||||||
|
Loading…
Reference in New Issue
Block a user