summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2017-09-02 22:32:31 +0200
committerHein-Pieter van Braam <hp@tmm.cx>2017-09-08 15:03:53 +0200
commitb2a38854fdde296fd2d7da139a29b23a18ab494d (patch)
tree951326f4d966e01d4f8d4402dc7beb2252560b7a /editor/plugins/script_text_editor.cpp
parentd1cb73b47a17de830d9474026ffa7b3587cfbc68 (diff)
downloadredot-engine-b2a38854fdde296fd2d7da139a29b23a18ab494d.tar.gz
Fix unused variable warnings
The forth in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index fae57eb5d2..2192d3ac49 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -624,7 +624,7 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<String>
}
String hint;
Error err = script->get_language()->complete_code(p_code, script->get_path().get_base_dir(), base, r_options, r_force, hint);
- if (hint != "") {
+ if (err == OK && hint != "") {
code_editor->get_text_edit()->set_code_hint(hint);
}
}