Commit 28cc04f1 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Fix possible crash creating an unknown dock widget

if an unknown string was passed to createInnerDockidget,
the widget would not be created but a reference to the null
pointer would still be saved on the avaliable dock widgets,
and thus any code that foreached the list accessing methods
could led to a crash.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 2448b80b
......@@ -389,6 +389,7 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
widget = pInfoView;
} else {
qWarning() << "Attempt to create unknown Inner Dock Widget" << widgetName;
return;
}
_mapName2DockWidget[widgetName] = widget;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment