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 )
|
if( !aFootprint )
|
||||||
{
|
{
|
||||||
wxLogTrace( "KICAD_LIB_WATCH", "Remove watch" );
|
wxLogTrace( "KICAD_LIB_WATCH", "Remove watch" );
|
||||||
|
|
||||||
|
if( m_watcher )
|
||||||
m_watcher->RemoveAll();
|
m_watcher->RemoveAll();
|
||||||
|
|
||||||
m_watcher.reset();
|
m_watcher.reset();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue