From af79d2cb38bf816b25a349afa59a48c02833d7bc Mon Sep 17 00:00:00 2001 From: Ensiform Date: Thu, 29 May 2014 22:27:00 -0500 Subject: [PATCH] Fix an invalid null deref check in the slider code. --- code/ui/ui_shared.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ui/ui_shared.c b/code/ui/ui_shared.c index 0cc74f7b..a7bdd31c 100644 --- a/code/ui/ui_shared.c +++ b/code/ui/ui_shared.c @@ -1491,7 +1491,7 @@ float Item_Slider_ThumbPosition(itemDef_t *item) { x = item->window.rect.x; } - if (editDef == NULL && item->cvar) { + if (!editDef || !item->cvar) { return x; }