dtcm: Coverity 89111
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 18:02:57 +0000 (19:02 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 18:02:57 +0000 (19:02 +0100)
cde/programs/dtcm/dtcm/editor.c

index 2d392b111806a0f3f699f7ae55b277db9ee2c183..1f05cfe7112cd2a7fdcb431cce896800f8423102 100644 (file)
@@ -156,7 +156,7 @@ e_list_select_proc(Widget w, XtPointer client_data, XtPointer data) {
 static void
 e_quit_handler(Widget w, XtPointer cdata, XtPointer data) {
        Editor *e = (Editor *)cdata;
-       Widget popMeDown;
+       Widget popMeDown = NULL;
 
        if (w == e->frame) {
                editor_clean_up(e);
@@ -168,7 +168,9 @@ e_quit_handler(Widget w, XtPointer cdata, XtPointer data) {
                popMeDown = e->view_form;
        }
 
-       XtUnmanageChild(popMeDown);
+       if(popMeDown) {
+               XtUnmanageChild(popMeDown);
+       }
 }