Преглед изворни кода

fix crash when object malloc_size no greater than zero

dazi.dp пре 10 година
родитељ
комит
98d83bb438
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      Classes/GlobalStateExplorers/FLEXInstancesTableViewController.m

+ 3 - 1
Classes/GlobalStateExplorers/FLEXInstancesTableViewController.m

@@ -31,7 +31,9 @@
             // Note: objects of certain classes crash when retain is called. It is up to the user to avoid tapping into instance lists for these classes.
             // Ex. OS_dispatch_queue_specific_queue
             // In the future, we could provide some kind of warning for classes that are known to be problematic.
-            [instances addObject:object];
+            if (malloc_size((__bridge const void *)(object)) > 0) {
+                [instances addObject:object];
+            }
         }
     }];
     FLEXInstancesTableViewController *instancesViewController = [[self alloc] init];