Commit ce856e56 authored by Ralf Habacker's avatar Ralf Habacker

Coverity check CID 152231: Null pointer dereferences

Dereferencing a pointer that might be null uuc when calling parent.

CCBUG:340646
parent 2bb0e164
......@@ -2161,6 +2161,11 @@ void UMLListView::addNewItem(UMLListViewItem *parentItem, UMLListViewItem::ListV
QString name = classifier->uniqChildName(objectType);
UMLObject* object = Object_Factory::createChildObject(classifier, objectType, name);
if (object == 0) {
// creation was cancelled by the user
return;
}
// Handle primary key constraints (mark the unique constraint as PK on
// the parent entity)
if (type == UMLListViewItem::lvt_PrimaryKeyConstraint) {
......
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