dtstyle: Coverity 89011
authorPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:43:31 +0000 (18:43 +0100)
committerPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:43:31 +0000 (18:43 +0100)
cde/programs/dtstyle/ColorMain.c

index 4b3d4a825c63f2cf07604e35ed761e04f0c9da18..bcb223b1542d11ddeeb910f85557873c23b5f7d8 100644 (file)
@@ -1993,9 +1993,10 @@ DeletePaletteFromLinkList(
 
 
     selected_palette = pHeadPalette;
-    while( selected_palette->item_position != selected_position &&
-                                             selected_palette != NULL)
+    while( selected_palette != NULL
+           && selected_palette->item_position != selected_position ) {
         selected_palette = selected_palette->next;
+    }
 
     XmListDeletePos (list, selected_palette->item_position);