From 0b2cc9c3a9e6dd958175874df67a35f2d4496538 Mon Sep 17 00:00:00 2001 From: danij Date: Mon, 12 Sep 2011 02:20:42 +0100 Subject: [PATCH] Fixed bug in CP_CvarList which prevented the linked cvar from being updated when element zero was selected. --- doomsday/engine/portable/src/ui_panel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doomsday/engine/portable/src/ui_panel.c b/doomsday/engine/portable/src/ui_panel.c index ff637a02f6..ecd6ae51cb 100644 --- a/doomsday/engine/portable/src/ui_panel.c +++ b/doomsday/engine/portable/src/ui_panel.c @@ -735,8 +735,8 @@ void CP_CvarList(ui_object_t *ob) cvar_t* var = Con_FindVariable(list->data); int value = ((uidata_listitem_t *) list->items)[list->selection].data; - if(0 >= list->selection) return; - if(NULL == var) return; + if(list->selection < 0) return; + if(!var) return; CVar_SetInteger2(var, value, SVF_WRITE_OVERRIDE); }