From d6236b87dd0d969832024ac341adafa51e95dea8 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 29 Dec 2017 13:42:32 +0200 Subject: [PATCH] Fixed a crash in the OAM tab --- Cocoa/Document.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cocoa/Document.m b/Cocoa/Document.m index 89e31452..e5fb9ae1 100644 --- a/Cocoa/Document.m +++ b/Cocoa/Document.m @@ -1171,7 +1171,12 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height, else if (tableView == self.spritesTableView) { switch (columnIndex) { case 0: - return [Document imageFromData:[NSData dataWithBytesNoCopy:oamInfo[row].image length:64 * 4] width:8 height:oamHeight scale:16.0/oamHeight]; + return [Document imageFromData:[NSData dataWithBytesNoCopy:oamInfo[row].image + length:64 * 4 + freeWhenDone:NO] + width:8 + height:oamHeight + scale:16.0/oamHeight]; case 1: return @((int)oamInfo[row].x - 8); case 2: