Przeglądaj źródła

[c] Closes #2394, double free of sequences in mesh attachments.

Mario Zechner 1 rok temu
rodzic
commit
087b2688db

+ 0 - 1
spine-c/spine-c/src/spine/MeshAttachment.c

@@ -43,7 +43,6 @@ void _spMeshAttachment_dispose(spAttachment *attachment) {
 		FREE(self->edges);
 	} else
 		_spAttachment_deinit(attachment);
-	if (self->sequence) FREE(self->sequence);
 	FREE(self);
 }
 

+ 2 - 2
spine-ts/spine-webgl/src/SpineCanvas.ts

@@ -87,7 +87,7 @@ export class SpineCanvas {
 			update: () => { },
 			render: () => { },
 			error: () => { },
-			dispose: () => { },
+			dispose: () => { },
 		}
 		if (config.webglConfig) config.webglConfig = { alpha: true };
 
@@ -131,7 +131,7 @@ export class SpineCanvas {
 	}
 
 	/** Disposes the app, so the update() and render() functions are no longer called. Calls the dispose() callback.*/
-	dispose() {
+	dispose () {
 		if (this.config.app.dispose) this.config.app.dispose(this);
 		this.disposed = true;
 	}

+ 5 - 7
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineEditorPlugin.cpp

@@ -31,20 +31,18 @@
 #include "AssetTypeActions_Base.h"
 #include "SpineAtlasAsset.h"
 #include "SpineSkeletonDataAsset.h"
- 
-class FSpineAtlasAssetTypeActions : public FAssetTypeActions_Base
-{
+
+class FSpineAtlasAssetTypeActions : public FAssetTypeActions_Base {
 public:
-	UClass* GetSupportedClass() const override { return USpineAtlasAsset::StaticClass(); };
+	UClass *GetSupportedClass() const override { return USpineAtlasAsset::StaticClass(); };
 	FText GetName() const override { return INVTEXT("Spine atlas asset"); };
 	FColor GetTypeColor() const override { return FColor::Red; };
 	uint32 GetCategories() override { return EAssetTypeCategories::Misc; };
 };
 
-class FSpineSkeletonDataAssetTypeActions : public FAssetTypeActions_Base
-{
+class FSpineSkeletonDataAssetTypeActions : public FAssetTypeActions_Base {
 public:
-	UClass* GetSupportedClass() const override { return USpineSkeletonDataAsset::StaticClass(); };
+	UClass *GetSupportedClass() const override { return USpineSkeletonDataAsset::StaticClass(); };
 	FText GetName() const override { return INVTEXT("Spine data asset"); };
 	FColor GetTypeColor() const override { return FColor::Red; };
 	uint32 GetCategories() override { return EAssetTypeCategories::Misc; };