From 9e0cd3fe515bfc6f85f76a3990dba3fb0645e66c Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 3 Jul 2018 18:45:31 +0100 Subject: [PATCH] dtstyle: Coverity 88726 --- 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 bcb223b1..811c6c72 100644 --- a/cde/programs/dtstyle/ColorMain.c +++ b/cde/programs/dtstyle/ColorMain.c @@ -851,9 +851,10 @@ selectPaletteCB( selected_position = cb->item_position; 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(tmp_palette->item_position == selected_position) { -- 2.25.1