NDK/Console: Fix crash on empty history
This commit is contained in:
@@ -81,6 +81,9 @@ namespace Ndk
|
||||
{
|
||||
*ignoreDefaultAction = true;
|
||||
|
||||
if (m_commandHistory.empty())
|
||||
return;
|
||||
|
||||
if (m_historyPosition > 0)
|
||||
m_historyPosition--;
|
||||
|
||||
@@ -91,6 +94,9 @@ namespace Ndk
|
||||
{
|
||||
*ignoreDefaultAction = true;
|
||||
|
||||
if (m_commandHistory.empty())
|
||||
return;
|
||||
|
||||
if (++m_historyPosition >= m_commandHistory.size())
|
||||
m_historyPosition = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user