From 6e9df018969ab91198d26795f4df30f56eafb90b Mon Sep 17 00:00:00 2001 From: Drew Waddell Date: Mon, 12 Apr 2021 14:00:44 -0400 Subject: [PATCH] Updated PA__ResizeArray If an ARRAY BLOB had a size and PA_ResizeArray was called an error would occur, updated the code to correctly dispose of the elements in the array. --- 4D Plugin API/4DPluginAPI.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/4D Plugin API/4DPluginAPI.c b/4D Plugin API/4DPluginAPI.c index b0330ea..b3b762a 100755 --- a/4D Plugin API/4DPluginAPI.c +++ b/4D Plugin API/4DPluginAPI.c @@ -4503,11 +4503,11 @@ void PA_ResizeArray( PA_Variable *ar, PA_long32 nb ) // if array become smaller if ( nb < ar->uValue.fArray.fNbElements ) { - PA_Blob** ptBlobHandle = (PA_Blob**) PA_LockHandle( ar->uValue.fArray.fData ); + PA_Blob* ptBlobHandle = (PA_Blob*) PA_LockHandle( ar->uValue.fArray.fData ); for ( i = nb + 1; i <= ar->uValue.fArray.fNbElements; i++ ) { - PA_DisposeHandle(ptBlobHandle[i]->fHandle); + PA_DisposeHandle(ptBlobHandle[i].fHandle); } PA_UnlockHandle( ar->uValue.fArray.fData );