Prevent null dereference
This commit is contained in:
parent
8546d417df
commit
530af96da2
|
@ -996,10 +996,14 @@ void SIMULATOR_FRAME_UI::onSignalsGridCellChanged( wxGridEvent& aEvent )
|
||||||
if( m_SuppressGridEvents > 0 )
|
if( m_SuppressGridEvents > 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() );
|
||||||
|
|
||||||
|
if( !plotTab )
|
||||||
|
return;
|
||||||
|
|
||||||
int row = aEvent.GetRow();
|
int row = aEvent.GetRow();
|
||||||
int col = aEvent.GetCol();
|
int col = aEvent.GetCol();
|
||||||
wxString text = m_signalsGrid->GetCellValue( row, col );
|
wxString text = m_signalsGrid->GetCellValue( row, col );
|
||||||
SIM_PLOT_TAB* plotTab = dynamic_cast<SIM_PLOT_TAB*>( GetCurrentSimTab() );
|
|
||||||
wxString signalName = m_signalsGrid->GetCellValue( row, COL_SIGNAL_NAME );
|
wxString signalName = m_signalsGrid->GetCellValue( row, COL_SIGNAL_NAME );
|
||||||
int traceType = SPT_UNKNOWN;
|
int traceType = SPT_UNKNOWN;
|
||||||
wxString vectorName = vectorNameFromSignalName( plotTab, signalName, &traceType );
|
wxString vectorName = vectorNameFromSignalName( plotTab, signalName, &traceType );
|
||||||
|
|
Loading…
Reference in New Issue