summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-08-21 10:05:24 +0200
committerGitHub <noreply@github.com>2019-08-21 10:05:24 +0200
commit51def4dab9d0e787c519aef914764a6140565d90 (patch)
tree9d9b83c2006e1e08a138b7d4d7ccebdcb5d9656d
parenta1e6eeef3ec3b980c938b77a942491ee2e890c55 (diff)
parenta735afac950bf4e04efcb606fee9a07c98e2759d (diff)
Merge pull request #31523 from nekomatata/show-warning-loading
EditorNode::show_warning displays a console warning during project loading
-rw-r--r--editor/editor_node.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 554958117b..3e97dbd96c 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3827,9 +3827,13 @@ void EditorNode::show_accept(const String &p_text, const String &p_title) {
void EditorNode::show_warning(const String &p_text, const String &p_title) {
- warning->set_text(p_text);
- warning->set_title(p_title);
- warning->popup_centered_minsize();
+ if (warning->is_inside_tree()) {
+ warning->set_text(p_text);
+ warning->set_title(p_title);
+ warning->popup_centered_minsize();
+ } else {
+ WARN_PRINTS(p_title + " " + p_text);
+ }
}
void EditorNode::_copy_warning(const String &p_str) {