Commit 12723383 authored by Jonathan Liu's avatar Jonathan Liu
Browse files

Fix SolDevice null pointer dereference

It can occur when selecting top level tree items.
parent 83abb46d
...@@ -141,7 +141,7 @@ void DeviceListing::currentItemChangedSlot(QTreeWidgetItem *listItemIn, QTreeWid ...@@ -141,7 +141,7 @@ void DeviceListing::currentItemChangedSlot(QTreeWidgetItem *listItemIn, QTreeWid
Q_UNUSED(previous); Q_UNUSED(previous);
SolDevice *listItem = static_cast<SolDevice *>(listItemIn); SolDevice *listItem = static_cast<SolDevice *>(listItemIn);
if (listItem->isDeviceSet()) { if (listItem && listItem->isDeviceSet()) {
iPanel->setTopInfo(listItem->deviceIcon(), listItem->device()); iPanel->setTopInfo(listItem->deviceIcon(), listItem->device());
QVListLayout *bottomLay = listItem->infoPanelLayout(); QVListLayout *bottomLay = listItem->infoPanelLayout();
Supports Markdown
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