From 4f1446124f740fd8c8ea08c1a5be0c8a5fa9ef8a Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Mon, 11 Aug 2008 20:13:48 +0200 Subject: [PATCH] Missing toolbar icon fallback code fix --- src/MacVim/MMVimController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MacVim/MMVimController.m b/src/MacVim/MMVimController.m index 2fa5103f28..08f69fd721 100644 --- a/src/MacVim/MMVimController.m +++ b/src/MacVim/MMVimController.m @@ -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 '%@';"