Mercurial > dwindows
comparison mac/dw.m @ 1825:df7f3967c21e
Fixed crash on Mac due to autoreleasing images not displayed.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sat, 27 Oct 2012 01:29:32 +0000 |
parents | 69f9aa1e1b1e |
children | 2fe7fca61236 |
comparison
equal
deleted
inserted
replaced
1824:213420512084 | 1825:df7f3967c21e |
---|---|
9147 NSImage *pixmap = [[[NSImage alloc] initWithData:thisdata] autorelease]; | 9147 NSImage *pixmap = [[[NSImage alloc] initWithData:thisdata] autorelease]; |
9148 | 9148 |
9149 if(pixmap) | 9149 if(pixmap) |
9150 { | 9150 { |
9151 [object setImage:pixmap]; | 9151 [object setImage:pixmap]; |
9152 [pixmap release]; | |
9153 } | 9152 } |
9154 /* If we changed the bitmap... */ | 9153 /* If we changed the bitmap... */ |
9155 Item *item = _box_item(handle); | 9154 Item *item = _box_item(handle); |
9156 | 9155 |
9157 /* Check to see if any of the sizes need to be recalculated */ | 9156 /* Check to see if any of the sizes need to be recalculated */ |
9217 { | 9216 { |
9218 _control_size(handle, item->origwidth == -1 ? &item->width : NULL, item->origheight == -1 ? &item->height : NULL); | 9217 _control_size(handle, item->origwidth == -1 ? &item->width : NULL, item->origheight == -1 ? &item->height : NULL); |
9219 /* Queue a redraw on the top-level window */ | 9218 /* Queue a redraw on the top-level window */ |
9220 _dw_redraw([object window], TRUE); | 9219 _dw_redraw([object window], TRUE); |
9221 } | 9220 } |
9222 [bitmap release]; | |
9223 } | 9221 } |
9224 } | 9222 } |
9225 DW_LOCAL_POOL_OUT; | 9223 DW_LOCAL_POOL_OUT; |
9226 } | 9224 } |
9227 | 9225 |