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

index 868e63a215c314e848b44f27ab89bc831c5a8d3e..4b3d4a825c63f2cf07604e35ed761e04f0c9da18 100644 (file)
@@ -1510,9 +1510,10 @@ deletePaletteCB(
 
     tmp_palette = pHeadPalette;
 
-    while( tmp_palette->item_position != selected_position &&
-                                             tmp_palette != NULL)
+    while( tmp_palette != NULL
+           && tmp_palette->item_position != selected_position ) {
         tmp_palette = tmp_palette->next;
+    }
     
     if (deleteDialog == NULL)
     {