From c076db11de038691bf7aef883258a5f7881669b1 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 3 Jul 2018 18:43:31 +0100 Subject: [PATCH] dtstyle: Coverity 89011 --- cde/programs/dtstyle/ColorMain.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtstyle/ColorMain.c b/cde/programs/dtstyle/ColorMain.c index 4b3d4a82..bcb223b1 100644 --- a/cde/programs/dtstyle/ColorMain.c +++ b/cde/programs/dtstyle/ColorMain.c @@ -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); -- 2.25.1