Author: rmottola
Date: Fri Jun 12 11:55:32 2015
New Revision: 38624

URL: http://svn.gna.org/viewcvs/gnustep?rev=38624&view=rev
Log:
Handle missing image better

Modified:
    apps/projectcenter/trunk/ChangeLog
    apps/projectcenter/trunk/Modules/Editors/ProjectCenter/PCEditor.m

Modified: apps/projectcenter/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/ChangeLog?rev=38624&r1=38623&r2=38624&view=diff
==============================================================================
--- apps/projectcenter/trunk/ChangeLog  (original)
+++ apps/projectcenter/trunk/ChangeLog  Fri Jun 12 11:55:32 2015
@@ -5,6 +5,9 @@
 
        * Framework/PCEditorManager.m
        Use the internal editor if it is available, even if no parser is 
available.
+
+       * Modules/Editors/ProjectCenter/PCEditor.m
+       Handle missing image better.
 
 2015-04-07 Riccardo Mottola <[email protected]>
 

Modified: apps/projectcenter/trunk/Modules/Editors/ProjectCenter/PCEditor.m
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/projectcenter/trunk/Modules/Editors/ProjectCenter/PCEditor.m?rev=38624&r1=38623&r2=38624&view=diff
==============================================================================
--- apps/projectcenter/trunk/Modules/Editors/ProjectCenter/PCEditor.m   
(original)
+++ apps/projectcenter/trunk/Modules/Editors/ProjectCenter/PCEditor.m   Fri Jun 
12 11:55:32 2015
@@ -488,10 +488,16 @@
     }
 
   bundle = [NSBundle bundleForClass:NSClassFromString(@"PCEditor")];
+
   imagePath = [bundle pathForResource:imageName ofType:@"tiff"];
-
-  image = [[NSImage alloc] initWithContentsOfFile:imagePath];
-
+  if (imagePath)
+    {
+      image = [[NSImage alloc] initWithContentsOfFile:imagePath];
+    }
+  else
+    {
+      NSLog(@"no image for %@", imageName);
+    }
   return AUTORELEASE(image);
 }
 


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

Reply via email to