avoid out of range access
This commit is contained in:
@ -138,7 +138,8 @@ void ChartWindow::quit()
|
|||||||
void ChartWindow::reset_zoom()
|
void ChartWindow::reset_zoom()
|
||||||
{
|
{
|
||||||
int choice = columns->currentData().toInt();
|
int choice = columns->currentData().toInt();
|
||||||
charts[choice]->reset_zoom();
|
if ((choice >= 0) && (choice < charts.size()))
|
||||||
|
charts[choice]->reset_zoom();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChartWindow::stop_run()
|
void ChartWindow::stop_run()
|
||||||
|
|||||||
Reference in New Issue
Block a user