Author: gcasa
Date: Wed Feb 11 19:07:05 2015
New Revision: 38337

URL: http://svn.gna.org/viewcvs/gnustep?rev=38337&view=rev
Log:
Correct crash when creating new project in project center.  Found a bug such 
that when there are no types passed in it tries to pull index 0 which does not 
exist causing a crash.

Modified:
    plugins/themes/WinUXTheme/ChangeLog
    plugins/themes/WinUXTheme/WinNSOpenPanel.m

Modified: plugins/themes/WinUXTheme/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/plugins/themes/WinUXTheme/ChangeLog?rev=38337&r1=38336&r2=38337&view=diff
==============================================================================
--- plugins/themes/WinUXTheme/ChangeLog (original)
+++ plugins/themes/WinUXTheme/ChangeLog Wed Feb 11 19:07:05 2015
@@ -1,3 +1,8 @@
+2015-02-11 Gregory John Casamento <[email protected]>
+
+       * WinNSOpenPanel.m: Change call to not pull the first type if the
+       types array is empty.
+
 2015-02-03 Gregory John Casamento <[email protected]>
 
        * GNUmakefile: Add new classes and headers

Modified: plugins/themes/WinUXTheme/WinNSOpenPanel.m
URL: 
http://svn.gna.org/viewcvs/gnustep/plugins/themes/WinUXTheme/WinNSOpenPanel.m?rev=38337&r1=38336&r2=38337&view=diff
==============================================================================
--- plugins/themes/WinUXTheme/WinNSOpenPanel.m  (original)
+++ plugins/themes/WinUXTheme/WinNSOpenPanel.m  Wed Feb 11 19:07:05 2015
@@ -648,9 +648,12 @@
       NSPopUpButton *popup = [NSPopUpButton new];
 
       [popup addItemWithTitle: @"None"];
-      [[popup itemAtIndex: 0] setRepresentedObject:
-                        [dc typeFromFileExtension:
-                              [types objectAtIndex: ofn.nFilterIndex - 1]]];
+      if ([types count] > 0)
+       {
+         [[popup itemAtIndex: 0] setRepresentedObject:
+                            [dc typeFromFileExtension:
+                                  [types objectAtIndex: ofn.nFilterIndex - 
1]]];
+       }
       [popup selectItemAtIndex: 0];
       [doc changeSaveType: [popup autorelease]];
  


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

Reply via email to