summaryrefslogtreecommitdiff
path: root/core/string_db.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/string_db.cpp')
-rw-r--r--core/string_db.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/string_db.cpp b/core/string_db.cpp
index 9a693f88e9..bf92c4eac4 100644
--- a/core/string_db.cpp
+++ b/core/string_db.cpp
@@ -183,7 +183,8 @@ StringName::StringName(const char *p_name) {
ERR_FAIL_COND(!configured);
- ERR_FAIL_COND( !p_name || !p_name[0]);
+ if (!p_name || p_name[0]==0)
+ return; //empty, ignore
_global_lock();
@@ -288,6 +289,9 @@ StringName::StringName(const String& p_name) {
ERR_FAIL_COND(!configured);
+ if (p_name==String())
+ return;
+
_global_lock();
uint32_t hash = p_name.hash();