summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/collada2gltf/UnpackedTarball_collada2gltf.mk1
-rw-r--r--external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.125
2 files changed, 26 insertions, 0 deletions
diff --git a/external/collada2gltf/UnpackedTarball_collada2gltf.mk b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
index db4b72ff69e7..def81f89f69d 100644
--- a/external/collada2gltf/UnpackedTarball_collada2gltf.mk
+++ b/external/collada2gltf/UnpackedTarball_collada2gltf.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_file,collada2gltf,.,external/collada2gltf/G
$(eval $(call gb_UnpackedTarball_add_patches,collada2gltf,\
external/collada2gltf/patches/wrong_uri_usage.patch.1 \
external/collada2gltf/patches/collada2gltf.new-delete-mismatch.patch.1 \
+ external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1 b/external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1
new file mode 100644
index 000000000000..a1fbee874263
--- /dev/null
+++ b/external/collada2gltf/patches/collada2gltf.fix-memory-leak.patch.1
@@ -0,0 +1,25 @@
+diff -ur collada2gltf.org/shaders/commonProfileShaders.cpp collada2gltf/shaders/commonProfileShaders.cpp
+--- collada2gltf.org/shaders/commonProfileShaders.cpp 2014-07-06 04:20:31.152197885 +0200
++++ collada2gltf/shaders/commonProfileShaders.cpp 2014-07-06 04:27:21.681181083 +0200
+@@ -495,6 +495,10 @@
+ this->_profile = profile;
+ this->_instanceProgram = new GLSLProgram(profile);
+ }
++
++ ~Pass() {
++ delete _instanceProgram;
++ }
+
+ GLSLProgram* instanceProgram() {
+ return this->_instanceProgram;
+@@ -1188,6 +1192,10 @@
+ fragmentShader->appendCode("}\n");
+
+ }
++
++ ~Technique() {
++ delete _pass;
++ }
+
+ shared_ptr <GLTF::JSONObject> parameters() {
+ return _parameters;