mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System : Guard null pointer access
This commit is contained in:
parent
97743e6d70
commit
f8e7a8aa26
@ -95,11 +95,14 @@ bool RiuTreeViewEventFilter::eventFilter(QObject *obj, QEvent *event)
|
|||||||
|
|
||||||
// Do not toggle state if currently editing a name in the tree view
|
// Do not toggle state if currently editing a name in the tree view
|
||||||
bool toggleStateForSelection = true;
|
bool toggleStateForSelection = true;
|
||||||
if (RiuMainWindow::instance()->projectTreeView()->isTreeItemEditWidgetActive())
|
if (RiuMainWindow::instance()->projectTreeView() &&
|
||||||
|
RiuMainWindow::instance()->projectTreeView()->isTreeItemEditWidgetActive())
|
||||||
{
|
{
|
||||||
toggleStateForSelection = false;
|
toggleStateForSelection = false;
|
||||||
}
|
}
|
||||||
else if (RiaApplication::instance()->mainPlotWindow() && RiaApplication::instance()->mainPlotWindow()->projectTreeView()->isTreeItemEditWidgetActive())
|
else if (RiaApplication::instance()->mainPlotWindow() &&
|
||||||
|
RiaApplication::instance()->mainPlotWindow()->projectTreeView() &&
|
||||||
|
RiaApplication::instance()->mainPlotWindow()->projectTreeView()->isTreeItemEditWidgetActive())
|
||||||
{
|
{
|
||||||
toggleStateForSelection = false;
|
toggleStateForSelection = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user