Skip to content

Commit

Permalink
WFL: fixed a crash using debug_print
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jan 24, 2021
1 parent 4ec1b46 commit 673937d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formula/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ DEFINE_WFL_FUNCTION(debug_print, 1, 2)

LOG_SF << str1 << std::endl;

if(game_config::debug) {
if(game_config::debug && game_display::get_singleton()) {
game_display::get_singleton()->get_chat_manager().add_chat_message(
std::time(nullptr), "WFL", 0, str1, events::chat_handler::MESSAGE_PUBLIC, false);
}
Expand Down

0 comments on commit 673937d

Please sign in to comment.