dtfile/IconWindow: CID 88242,88702,89030
authorJon Trulson <jon@radscan.com>
Wed, 11 Apr 2018 19:53:39 +0000 (13:53 -0600)
committerJon Trulson <jon@radscan.com>
Wed, 11 Apr 2018 22:25:52 +0000 (16:25 -0600)
cde/programs/dtfile/IconWindow.c

index f518eab0323258322a1c5ac46876abec0ac0769d..79e27573c1ed90d260bc3121252f337114172add 100644 (file)
@@ -296,7 +296,7 @@ FileWindowInputCallback(
    FileViewData * fileViewData = NULL;
    Arg args[10];
    DesktopRec * desktopRec;
-   KeySym keysym;
+   KeySym keysym = 0;
    Modifiers modif;
    int offset;
    Boolean found;
@@ -624,8 +624,8 @@ FileWindowInputCallback(
             {
               case osfXK_Delete:
                 {
-                  DtActionArg * action_args;
-                  int arg_count;
+                  DtActionArg * action_args = NULL;
+                  int arg_count = 0;
 
                   if( desktopRec == NULL
                       && file_mgr_rec != NULL )
@@ -669,7 +669,8 @@ FileWindowInputCallback(
                                     action_args, arg_count, NULL, NULL,
                                     trash_dir, True, NULL, NULL );
                   }
-                  _DtFreeActionArgs( action_args, arg_count );
+                  if (action_args && arg_count)
+                      _DtFreeActionArgs( action_args, arg_count );
                 }
                 break;
               case osfXK_Menu: