Commit 12180644 authored by Ensiform's avatar Ensiform Committed by IR4T4
Browse files

ui: Fix an invalid null deref check in the slider code.

parent 127bdf4e
......@@ -101,7 +101,7 @@ static qboolean Menu_OverActiveItem(menuDef_t *menu, float x, float y);
#define MEM_POOL_SIZE 1536 * 1024 // was 1024
#endif
//Is this diffevent in other systems? OSX?
// Is this diffevent in other systems? OSX?
#define K_CLIPBOARD(x) (tolower(x) == 'v' && DC->keyIsDown(K_CTRL))
static char memoryPool[MEM_POOL_SIZE];
......@@ -2678,7 +2678,7 @@ float Item_Slider_ThumbPosition(itemDef_t *item)
x = item->window.rect.x;
}
if (editDef == NULL && item->cvar)
if (!editDef || !item->cvar)
{
return x;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment