From 7ad05ccf2d8bc4638151489e1da4d4d2ab1168fb Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 22 Apr 2018 17:56:43 -0500 Subject: [PATCH] Make UI_DrawProportionalString handle NULL string This makes the function consistent with UI_DrawString. --- code/q3_ui/ui_atoms.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/q3_ui/ui_atoms.c b/code/q3_ui/ui_atoms.c index 55a7bfce..ac17814f 100644 --- a/code/q3_ui/ui_atoms.c +++ b/code/q3_ui/ui_atoms.c @@ -512,6 +512,10 @@ void UI_DrawProportionalString( int x, int y, const char* str, int style, vec4_t int width; float sizeScale; + if( !str ) { + return; + } + sizeScale = UI_ProportionalSizeScale( style ); switch( style & UI_FORMATMASK ) {