浏览代码

Merge pull request #21879 from willnationsdev/script-name-empty

Fix ScriptCreateDialog passing script w/ no filename
Rémi Verschelde 7 年之前
父节点
当前提交
ec788e1ac4
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      editor/script_create_dialog.cpp

+ 6 - 0
editor/script_create_dialog.cpp

@@ -443,6 +443,12 @@ void ScriptCreateDialog::_path_changed(const String &p_path) {
 		return;
 		return;
 	}
 	}
 
 
+	if (p.get_file().get_basename() == "") {
+		_msg_path_valid(false, TTR("Filename is empty"));
+		_update_dialog();
+		return;
+	}
+
 	/* All checks passed */
 	/* All checks passed */
 
 
 	is_path_valid = true;
 	is_path_valid = true;