Pcbnew, footprint editor: fix crash due to a null pointer use
This commit is contained in:
parent
cbb8835c87
commit
3ac454153e
|
@ -1155,8 +1155,12 @@ void PCB_BASE_FRAME::setFPWatcher( FOOTPRINT* aFootprint )
|
|||
if( !aFootprint )
|
||||
{
|
||||
wxLogTrace( "KICAD_LIB_WATCH", "Remove watch" );
|
||||
m_watcher->RemoveAll();
|
||||
|
||||
if( m_watcher )
|
||||
m_watcher->RemoveAll();
|
||||
|
||||
m_watcher.reset();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue