Git commit a22cec4fc7f853433c2bca3263cd8d77f4a7c677 by Jaroslaw Staniek. Committed on 31/03/2016 at 21:18. Pushed by staniek into branch 'master'. Avoid nullptr dereference (coverity) M +2 -1 src/formeditor/form.cpp M +3 -2 src/plugins/forms/widgets/kexidbform.cpp http://commits.kde.org/kexi/a22cec4fc7f853433c2bca3263cd8d77f4a7c677 diff --git a/src/formeditor/form.cpp b/src/formeditor/form.cpp index 6d198d3..931302d 100644 --- a/src/formeditor/form.cpp +++ b/src/formeditor/form.cpp @@ -1519,7 +1519,8 @@ void Form::createPropertiesForWidget(QWidget *w) } const char* propertyName =3D meta.name(); QWidget *subwidget =3D subMeta.isValid()//subpropIface - ? subpropIface->subwidget() : w; + ? (subpropIface ? subpropIface->subwidget() := 0) + : w; WidgetInfo *subwinfo =3D subwidget ? library()->widgetInfoForClass= Name( subwidget->metaObject()->className()) := 0; // qDebug() << "$$$ " << subwidget->className(); diff --git a/src/plugins/forms/widgets/kexidbform.cpp b/src/plugins/forms/w= idgets/kexidbform.cpp index 4f8196d..565f576 100644 --- a/src/plugins/forms/widgets/kexidbform.cpp +++ b/src/plugins/forms/widgets/kexidbform.cpp @@ -354,8 +354,9 @@ bool KexiDBForm::eventFilter(QObject * watched, QEvent = * e) = if (tab || backtab) { //the watched widget can be a subwidget of a real widget, = e.g. a drop down button of image box: find it - while (!KexiFormManager::self()->library()->widgetInfoForC= lassName( - realWidget->metaObject()->className())) { + while (realWidget && !KexiFormManager::self()->library()->= widgetInfoForClassName( + realWidget->metaObject()->className())) + { realWidget =3D realWidget->parentWidget(); } if (!realWidget)