Skip to content
This repository has been archived by the owner on May 16, 2020. It is now read-only.

Commit

Permalink
ui: Fix an invalid null deref check in the slider code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ensiform authored and IR4T4 committed Jul 6, 2014
1 parent 127bdf4 commit 1218064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/ui_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -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?

This comment has been minimized.

Copy link
@JanSimek

JanSimek Jul 6, 2014

Member

TODO: ...

#define K_CLIPBOARD(x) (tolower(x) == 'v' && DC->keyIsDown(K_CTRL))

static char memoryPool[MEM_POOL_SIZE];
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1218064

Please sign in to comment.