From: Peter Howkins Date: Tue, 3 Jul 2018 17:43:31 +0000 (+0100) Subject: dtstyle: Coverity 89011 X-Git-Tag: 2.3.0a~231 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c076db11de038691bf7aef883258a5f7881669b1;p=oweals%2Fcde.git dtstyle: Coverity 89011 --- 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);