changeset 760:2fb17622a455

Possible fix for exception in dw_bitmapbutton_new_from_data()
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 17 Mar 2011 23:21:19 +0000
parents 6d880e68e8d4
children 39d848c20c05
files mac/dw.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Thu Mar 17 20:56:43 2011 +0000
+++ b/mac/dw.m	Thu Mar 17 23:21:19 2011 +0000
@@ -2702,7 +2702,7 @@
  */
 HWND API dw_bitmapbutton_new_from_data(char *text, unsigned long cid, char *data, int len)
 {
-    NSData *thisdata = [[NSData alloc] dataWithBytes:data length:len];
+    NSData *thisdata = [NSData dataWithBytes:data length:len];
     NSImage *image = [[NSImage alloc] initWithData:thisdata];
     DWButton *button = _button_new("", cid);
     if(image)