forked from qt-creator/qt-creator
QmlDesigner: Fix Coverity Scan defect
dialog was just created and cannot be null. CID 1506796: Null pointer dereferences (REVERSE_INULL) Null-checking "dialog" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Change-Id: I53c116620c91b5b41b4028e367cb286e13193cf7 Reviewed-by: Tony Leinonen <tony.leinonen@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -739,7 +739,7 @@ void NavigatorTreeModel::handleItemLibraryItemDrop(const QMimeData *mimeData, in
|
||||
ChooseFromPropertyListDialog *dialog = nullptr;
|
||||
dialog = new ChooseFromPropertyListDialog(targetNode, testType, Core::ICore::dialogParent());
|
||||
dialog->exec();
|
||||
if (!dialog || dialog->result() == QDialog::Accepted)
|
||||
if (dialog->result() == QDialog::Accepted)
|
||||
targetNode.bindingProperty(dialog->selectedProperty()).setExpression(newModelNode.validId());
|
||||
delete dialog;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user