Skip to content

Commit ea3c717

Browse files
committed
gamestate: Return NONE command if command queue is empty on switch condition.
1 parent c1f171c commit ea3c717

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libopenage/gamestate/activity/condition/next_command_switch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ int next_command_switch(const time::time_t &time,
1616
entity->get_component(component::component_t::COMMANDQUEUE));
1717

1818
if (command_queue->get_commands().empty(time)) {
19-
return -1;
19+
return static_cast<int>(component::command::command_t::NONE);
2020
}
2121

2222
auto command = command_queue->get_commands().front(time);

0 commit comments

Comments
 (0)