Author: mlytwyn
Date: Sun Mar 19 16:01:42 2017
New Revision: 40402

URL: http://svn.gna.org/viewcvs/gnustep?rev=40402&view=rev
Log:
Fix attempt to remove nil object from array

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/NSApplication.m

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSApplication.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSApplication.m?rev=40402&r1=40401&r2=40402&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSApplication.m   
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSApplication.m   Sun Mar 
19 16:01:42 2017
@@ -2764,9 +2764,13 @@
 - (NSArray*) windows
 {
   // Omit the app icon window
-  NSMutableArray *windows = AUTORELEASE([GSAllWindows() mutableCopy]);
-  [windows removeObject: [self iconWindow]];
-  return windows;
+  if ([self iconWindow])
+  {
+    NSMutableArray *windows = AUTORELEASE([GSAllWindows() mutableCopy]);
+    [windows removeObject: [self iconWindow]];
+    return windows;
+  }
+  return GSAllWindows();
 }
 
 /**


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to