summaryrefslogtreecommitdiff
path: root/modules/fbx
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-04-07 11:25:38 +0200
committerGitHub <noreply@github.com>2021-04-07 11:25:38 +0200
commite261c2dd9d60a4aae473870b4f93babd8f117072 (patch)
tree1e781547693eeb4609af08228eec598172bf25ba /modules/fbx
parentf96392a2b5ee1ebd9c14c92bdcd24d25e8b7774b (diff)
parent09bda3f140937aaf5e4f028f7f04656ca30c7e6b (diff)
Merge pull request #46877 from W4RH4WK/always-dynamically-allocate-property-table
Always dynamically allocate PropertyTable
Diffstat (limited to 'modules/fbx')
-rw-r--r--modules/fbx/fbx_parser/FBXDocumentUtil.cpp2
-rw-r--r--modules/fbx/fbx_parser/FBXProperties.cpp5
-rw-r--r--modules/fbx/fbx_parser/FBXProperties.h1
3 files changed, 7 insertions, 1 deletions
diff --git a/modules/fbx/fbx_parser/FBXDocumentUtil.cpp b/modules/fbx/fbx_parser/FBXDocumentUtil.cpp
index 835b66ab23..df50a32c39 100644
--- a/modules/fbx/fbx_parser/FBXDocumentUtil.cpp
+++ b/modules/fbx/fbx_parser/FBXDocumentUtil.cpp
@@ -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();
}
diff --git a/modules/fbx/fbx_parser/FBXProperties.cpp b/modules/fbx/fbx_parser/FBXProperties.cpp
index ea023b2629..84e71512d6 100644
--- a/modules/fbx/fbx_parser/FBXProperties.cpp
+++ b/modules/fbx/fbx_parser/FBXProperties.cpp
@@ -149,6 +149,11 @@ PropertyTable::PropertyTable() {
}
// ------------------------------------------------------------------------------------------------
+PropertyTable::PropertyTable(const PropertyTable *templateProps) :
+ templateProps(templateProps), element() {
+}
+
+// ------------------------------------------------------------------------------------------------
PropertyTable::PropertyTable(const ElementPtr element, const PropertyTable *templateProps) :
templateProps(templateProps), element(element) {
const ScopePtr scope = GetRequiredScope(element);
diff --git a/modules/fbx/fbx_parser/FBXProperties.h b/modules/fbx/fbx_parser/FBXProperties.h
index 27cacfaf76..0595b25fa7 100644
--- a/modules/fbx/fbx_parser/FBXProperties.h
+++ b/modules/fbx/fbx_parser/FBXProperties.h
@@ -137,6 +137,7 @@ class PropertyTable {
public:
// in-memory property table with no source element
PropertyTable();
+ PropertyTable(const PropertyTable *templateProps);
PropertyTable(const ElementPtr element, const PropertyTable *templateProps);
~PropertyTable();