1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Always dynamically allocate PropertyTable

- `Texture::~Texture` expects `props` to be dynamically allocated.

- `GetPropertyTable` returned a pointer to an existing `PropertyTable`
  but is expected to return a newly, dynamically allocated one.

- `PropertyTable::PropertyTable()` suggests that an empty `element`
  property is valid.

fix #46876
fix #45573
This commit is contained in:
Alex Hirsch
2021-03-10 19:09:41 +01:00
parent 85cb3c044d
commit 09bda3f140
3 changed files with 7 additions and 1 deletions

View File

@@ -160,7 +160,7 @@ const PropertyTable *GetPropertyTable(const Document &doc,
DOMWarning("property table (Properties70) not found", element);
}
if (templateProps) {
return templateProps;
return new const PropertyTable(templateProps);
} else {
return new const PropertyTable();
}