diff options
Diffstat (limited to 'src/cgame/cg_draw.c')
-rw-r--r-- | src/cgame/cg_draw.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 4d70b343..690df742 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2645,10 +2645,9 @@ static void CG_DrawLocation( rectDef_t *rect, float scale, int textalign, vec4_t maxX = rect->x + rect->w; locent = CG_GetPlayerLocation( ); - if( locent ) - location = CG_ConfigString( CS_LOCATIONS + locent->currentState.generic1 ); - else - location = CG_ConfigString( CS_LOCATIONS ); + if( !locent ) + return; + location = CG_ConfigString( CS_LOCATIONS + locent->currentState.generic1 ); // need to skip horiz. align if it's too long, but valign must be run either way if( UI_Text_Width( location, scale ) < rect->w ) |