WFL: fixed a crash using debug_print

This commit is contained in:
Charles Dang 2021-01-25 09:19:04 +11:00
parent 4ec1b46c09
commit 673937d573

View file

@ -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);
}