Fixed crash when user press TAB while in-game console is open.

Fixed crash when user press TAB while in-game console is open.

diff --git a/src/engine/qcommon/common.cpp b/src/engine/qcommon/common.cpp
index f8ebd46..743bbec 100644
--- a/src/engine/qcommon/common.cpp
+++ b/src/engine/qcommon/common.cpp
@@ -4106,6 +4106,11 @@ void Field_CompleteCommand( valueType* cmd, bool doCommands, bool doCvars )
         completionString = cmdSystem->Argv( completionArgument - 1 );
     }
     
+    if( completionString == nullptr )
+    {
+        return;
+    }
+    
 #ifndef DEDICATED
     // Unconditionally add a '\' to the start of the buffer
     if( completionField->buffer[0] && completionField->buffer[0] != '\\' )

GitHub
sha: bc8e1fbb