From cd698eddafbb49ef4f2bb02bf8b5e1d74b472b59 Mon Sep 17 00:00:00 2001 From: Tommy Schmitz Date: Fri, 19 Aug 2011 20:58:49 +0000 Subject: [PATCH] Fix crash. --- src/whiteboard/side_actions.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/whiteboard/side_actions.cpp b/src/whiteboard/side_actions.cpp index 518e49c4f0d..113a13658e5 100644 --- a/src/whiteboard/side_actions.cpp +++ b/src/whiteboard/side_actions.cpp @@ -124,14 +124,10 @@ void side_actions::get_numbers(const map_location& hex, numbers_t& result) bool side_actions::execute_next() { - if (!actions_.front().empty()) - { + if(!empty() && !actions_.front().empty()) return execute(begin()); - } - else - { + else //nothing is executable right now return false; - } } void side_actions::execute_all() @@ -154,7 +150,7 @@ void side_actions::execute_all() { iterator position = begin(); bool finished = execute(position); - keep_executing = finished && !actions_.front().empty(); + keep_executing = finished && !empty() && !actions_.front().empty(); } }