changeset 1672:42890a2b8d3e

Fix minor issues with dw_box_remove_at_index() on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 26 Apr 2012 23:26:35 +0000
parents d5f39d32c4da
children db393069b27d
files mac/dw.m
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mac/dw.m	Thu Apr 26 21:57:18 2012 +0000
+++ b/mac/dw.m	Thu Apr 26 23:26:35 2012 +0000
@@ -4004,8 +4004,11 @@
             
             object = thisitem[index].hwnd;
             
-            [object retain];
-            [object removeFromSuperview];
+            if(object)
+            {
+                [object retain];
+                [object removeFromSuperview];
+            }
             
             tmpitem = malloc(sizeof(Item)*(thisbox->count-1));
             
@@ -4028,7 +4031,7 @@
     }
     DW_MUTEX_UNLOCK;
     DW_LOCAL_POOL_OUT;
-    return 0;
+    return object;
 }
 
 /*