Browse Source

Fix using wrong variable when checking in `ResourceSaver::save`

Rindbee 3 years ago
parent
commit
279e5e90f2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/io/resource_saver.cpp

+ 1 - 1
core/io/resource_saver.cpp

@@ -80,7 +80,7 @@ Error ResourceSaver::save(const Ref<Resource> &p_resource, const String &p_path,
 	if (path.is_empty()) {
 	if (path.is_empty()) {
 		path = p_resource->get_path();
 		path = p_resource->get_path();
 	}
 	}
-	ERR_FAIL_COND_V_MSG(p_path.is_empty(), ERR_INVALID_PARAMETER, "Can't save resource to empty path. Provide non-empty path or a Resource with non-empty resource_path.");
+	ERR_FAIL_COND_V_MSG(path.is_empty(), ERR_INVALID_PARAMETER, "Can't save resource to empty path. Provide non-empty path or a Resource with non-empty resource_path.");
 
 
 	String extension = path.get_extension();
 	String extension = path.get_extension();
 	Error err = ERR_FILE_UNRECOGNIZED;
 	Error err = ERR_FILE_UNRECOGNIZED;