From 9e038c8b2b5863ec9273e4316502a320abb6ef6a Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 13 Jul 2018 19:04:37 +0100 Subject: [PATCH] dtcm: Coverity 89685 --- cde/programs/dtcm/dtcm/dnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtcm/dtcm/dnd.c b/cde/programs/dtcm/dtcm/dnd.c index 0615efae..abc58c12 100644 --- a/cde/programs/dtcm/dtcm/dnd.c +++ b/cde/programs/dtcm/dtcm/dnd.c @@ -521,7 +521,7 @@ CSA_entry_handle get_appt_struct(DragContext *context) { int *item_list = NULL, item_cnt = 0, answer; char buf[MAXNAMELEN]; - Widget list; + Widget list = NULL; Calendar *c = context->calendar; Props_pu *pr; CSA_entry_handle entry = 0; @@ -536,7 +536,7 @@ get_appt_struct(DragContext *context) { else if (context->editor_type == TodoEditorList) list = ((ToDo *) context->editor)->todo_list; - if (!XmListGetSelectedPos(list, &item_list, &item_cnt)) { + if (list && !XmListGetSelectedPos(list, &item_list, &item_cnt)) { char *title = XtNewString(catgets(c->DT_catd, 1, 230, "Calendar : Error - Drag Appointment")); char *text = XtNewString(catgets(c->DT_catd, 1, 231, "Select an appointment and DRAG again.")); -- 2.25.1