diff --git a/code/qcommon/q_shared.c b/code/qcommon/q_shared.c index 690838cc..a771c829 100644 --- a/code/qcommon/q_shared.c +++ b/code/qcommon/q_shared.c @@ -600,6 +600,10 @@ void SkipRestOfLine ( char **data ) { int c; p = *data; + + if ( !*p ) + return; + while ( (c = *p++) != 0 ) { if ( c == '\n' ) { com_lines++;