mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
avoid nullptr checks by initializing the pointers
This commit is contained in:
parent
8d4f468edd
commit
43d3d6a876
|
@ -140,9 +140,9 @@ void CGameConsole::CInstance::Reset()
|
|||
{
|
||||
m_CompletionRenderOffset = 0.0f;
|
||||
m_CompletionRenderOffsetChange = 0.0f;
|
||||
m_pCommandName = nullptr;
|
||||
m_pCommandHelp = nullptr;
|
||||
m_pCommandParams = nullptr;
|
||||
m_pCommandName = "";
|
||||
m_pCommandHelp = "";
|
||||
m_pCommandParams = "";
|
||||
}
|
||||
|
||||
void CGameConsole::CInstance::ExecuteLine(const char *pLine)
|
||||
|
@ -692,7 +692,7 @@ void CGameConsole::OnRender()
|
|||
pConsole->m_CompletionRenderOffset = Info.m_Offset;
|
||||
}
|
||||
|
||||
if(NumArguments <= 0 && pConsole->m_IsCommand && pConsole->m_pCommandName && pConsole->m_pCommandHelp && pConsole->m_pCommandParams)
|
||||
if(NumArguments <= 0 && pConsole->m_IsCommand)
|
||||
{
|
||||
char aBuf[512];
|
||||
str_format(aBuf, sizeof(aBuf), "Help: %s ", pConsole->m_pCommandHelp);
|
||||
|
|
Loading…
Reference in a new issue