summaryrefslogtreecommitdiff
path: root/editor/script_create_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/script_create_dialog.cpp')
-rw-r--r--editor/script_create_dialog.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 24c4ba4cb7..8c36a71d71 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -30,13 +30,13 @@
#include "script_create_dialog.h"
+#include "core/io/resource_saver.h"
+#include "core/os/file_access.h"
+#include "core/project_settings.h"
+#include "core/script_language.h"
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
#include "editor_file_system.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
-#include "project_settings.h"
-#include "script_language.h"
void ScriptCreateDialog::_notification(int p_what) {
@@ -443,6 +443,12 @@ void ScriptCreateDialog::_path_changed(const String &p_path) {
return;
}
+ if (p.get_file().get_basename() == "") {
+ _msg_path_valid(false, TTR("Filename is empty"));
+ _update_dialog();
+ return;
+ }
+
/* All checks passed */
is_path_valid = true;