diff options
Diffstat (limited to 'src/clientenvironment.cpp')
-rw-r--r-- | src/clientenvironment.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp index cc75fd2d6..36e4437b6 100644 --- a/src/clientenvironment.cpp +++ b/src/clientenvironment.cpp @@ -598,15 +598,13 @@ void ClientEnvironment::getActiveObjects(v3f origin, f32 max_d, } } -ClientEnvEvent ClientEnvironment::getClientEvent() +ClientEnvEvent ClientEnvironment::getClientEnvEvent() { - ClientEnvEvent event; - if(m_client_event_queue.empty()) - event.type = CEE_NONE; - else { - event = m_client_event_queue.front(); - m_client_event_queue.pop(); - } + FATAL_ERROR_IF(m_client_event_queue.empty(), + "ClientEnvironment::getClientEnvEvent(): queue is empty"); + + ClientEnvEvent event = m_client_event_queue.front(); + m_client_event_queue.pop(); return event; } |