瀏覽代碼

Improve NavigationServer.free() error msg when RID not found

Improves the error msg when NavigationServer.free() does not find the RID e.g. because it was already deleted or did never exist in the first place.
smix8 2 年之前
父節點
當前提交
b51cab3411
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/navigation/godot_navigation_server.cpp

+ 1 - 1
modules/navigation/godot_navigation_server.cpp

@@ -757,7 +757,7 @@ COMMAND_1(free, RID, p_object) {
 		agent_owner.free(p_object);
 		agent_owner.free(p_object);
 
 
 	} else {
 	} else {
-		ERR_FAIL_COND("Invalid ID.");
+		ERR_FAIL_COND("Attempted to free a NavigationServer RID that did not exist (or was already freed).");
 	}
 	}
 }
 }