Skip to content

Commit

Permalink
Corrected order.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Aug 10, 2024
1 parent 55fecde commit 3dcfcc6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/magick-image-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,15 @@ export class MagickImageCollection extends Array<MagickImage> implements IMagick
}
}

private checkResult(images: number, exception: Exception): number {
return exception.check(() => {
return images;
}, () => {
ImageMagick._api._MagickImageCollection_Dispose(images);
return 0;
});
}

private static createObject(): MagickImageCollection {
return Object.create(MagickImageCollection.prototype);
}
Expand Down Expand Up @@ -701,13 +710,4 @@ export class MagickImageCollection extends Array<MagickImage> implements IMagick
if (this.length === 0)
throw new MagickError('operation requires at least one image');
}

private checkResult(images: number, exception: Exception): number {
return exception.check(() => {
return images;
}, () => {
ImageMagick._api._MagickImageCollection_Dispose(images);
return 0;
});
}
}

0 comments on commit 3dcfcc6

Please sign in to comment.