mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-13 14:13:02 +00:00
Handle missing image better
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@38624 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
635a857419
commit
fdae99568e
2 changed files with 12 additions and 3 deletions
|
@ -6,6 +6,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 <rm@gnu.org>
|
||||
|
||||
* Modules/Editors/ProjectCenter/PCEditorView.m
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue