Missing toolbar icon fallback code fix

This commit is contained in:
Bjorn Winckler
2008-08-11 20:13:48 +02:00
parent 232720a611
commit 4f1446124f
+4 -1
View File
@@ -1260,8 +1260,11 @@ static BOOL isUnsafeMessage(int msgid);
[item setAutovalidates:NO];
NSImage *img = [NSImage imageNamed:icon];
if (!img)
if (!img) {
img = [[[NSImage alloc] initByReferencingFile:icon] autorelease];
if (!(img && [img isValid]))
img = nil;
}
if (!img) {
NSLog(@"WARNING: Could not find image with name '%@' to use as toolbar"
" image for identifier '%@';"