Fixed a segfault in the tutorial
(game segfaulting when a message with no speaker is issued)
This commit is contained in:
parent
2bac6afceb
commit
98b7a7917d
1 changed files with 5 additions and 1 deletions
|
@ -839,7 +839,11 @@ bool event_handler::handle_event_command(const queued_event& event_info, const s
|
|||
return rval;
|
||||
}
|
||||
|
||||
std::cerr << "set speaker to '" << speaker->second.description() << "'\n";
|
||||
if(speaker != units->end()) {
|
||||
std::cerr << "set speaker to '" << speaker->second.description() << "'\n";
|
||||
} else {
|
||||
std::cerr << "no speaker\n";
|
||||
}
|
||||
|
||||
const std::string& sfx = cfg["sound"];
|
||||
if(sfx != "") {
|
||||
|
|
Loading…
Add table
Reference in a new issue