fix scripts not reloading when edited externally

This commit is contained in:
Manuel Strey 2018-09-14 17:24:12 +02:00
parent 2aad7f1376
commit ebd518c9c9

View file

@ -797,7 +797,7 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
if (se) {
RES edited_res = se->get_edited_resource();
if (edited_res.is_valid() && p_for_script != edited_res)
if (p_for_script.is_valid() && edited_res.is_valid() && p_for_script != edited_res)
continue;
if (edited_res->get_path() == "" || edited_res->get_path().find("local://") != -1 || edited_res->get_path().find("::") != -1)