common: prevent segfault with no edit frame in TOOL_MANAGER

This commit is contained in:
Tomasz Wlostowski 2020-02-03 14:31:58 +01:00
parent 9e605d6958
commit 6673554866
1 changed files with 5 additions and 1 deletions

View File

@ -932,7 +932,11 @@ bool TOOL_MANAGER::ProcessEvent( const TOOL_EVENT& aEvent )
if( m_view && m_view->IsDirty() )
{
GetEditFrame()->RefreshCanvas();
auto frame = GetEditFrame();
if( frame )
{
frame->RefreshCanvas();
}
#if defined( __WXMAC__ ) || defined( __WINDOWS__ )
wxTheApp->ProcessPendingEvents(); // required for updating brightening behind a popup menu