Browse Source

Fix ambiguity in StringName (null data vs. data with empty string)

Pedro J. Estébanez 8 years ago
parent
commit
6289997724
1 changed files with 3 additions and 0 deletions
  1. 3 0
      core/string_db.cpp

+ 3 - 0
core/string_db.cpp

@@ -288,6 +288,9 @@ StringName::StringName(const String& p_name) {
 
 	ERR_FAIL_COND(!configured);
 
+	if (p_name.empty())
+		return;
+
 	_global_lock();
 
 	uint32_t hash = p_name.hash();