mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 10:00:23 +08:00
DatabaseViewer: Fixed seg fault on Mac when opening db
This commit is contained in:
@@ -528,15 +528,18 @@ void StatsToolBox::clear()
|
|||||||
plots[0]->clearData();
|
plots[0]->clearData();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UERROR("");
|
UERROR("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QList<StatItem*> items = _statBox->currentWidget()->findChildren<StatItem*>();
|
if(_statBox->currentWidget())
|
||||||
for (int i = 0; i<items.size(); ++i)
|
{
|
||||||
{
|
QList<StatItem*> items = _statBox->currentWidget()->findChildren<StatItem*>();
|
||||||
items[i]->clearCache();
|
for (int i = 0; i<items.size(); ++i)
|
||||||
}
|
{
|
||||||
|
items[i]->clearCache();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatsToolBox::contextMenuEvent(QContextMenuEvent * event)
|
void StatsToolBox::contextMenuEvent(QContextMenuEvent * event)
|
||||||
@@ -567,7 +570,7 @@ void StatsToolBox::contextMenuEvent(QContextMenuEvent * event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!plotName.isEmpty())
|
if(!plotName.isEmpty() && _statBox->currentWidget())
|
||||||
{
|
{
|
||||||
QList<StatItem*> items = _statBox->currentWidget()->findChildren<StatItem*>();
|
QList<StatItem*> items = _statBox->currentWidget()->findChildren<StatItem*>();
|
||||||
for(int i=0; i<items.size(); ++i)
|
for(int i=0; i<items.size(); ++i)
|
||||||
|
|||||||
Reference in New Issue
Block a user