diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2021-08-05 08:45:47 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2021-08-05 08:45:47 +1000 |
commit | 334c795c94f69a827ac2da6acd8e9ff227a18767 (patch) | |
tree | 50991f96749d8f11594006e548b838ee2566bfdc | |
parent | c883de3983aa88cd6bb6236a40c24107205e496a (diff) | |
download | scintilla-mirror-334c795c94f69a827ac2da6acd8e9ff227a18767.tar.gz |
Log warning if images don't load.
-rw-r--r-- | cocoa/ScintillaView.mm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index f82872d65..21f259157 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -1232,11 +1232,19 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) { NSString *path = [bundle pathForResource: @"mac_cursor_busy" ofType: @"tiff" inDirectory: nil]; NSImage *image = [[NSImage alloc] initWithContentsOfFile: path]; - waitCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(2, 2)]; + if (image) { + waitCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(2, 2)]; + } else { + NSLog(@"Wait cursor is invalid."); + } path = [bundle pathForResource: @"mac_cursor_flipped" ofType: @"tiff" inDirectory: nil]; image = [[NSImage alloc] initWithContentsOfFile: path]; - reverseArrowCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(15, 2)]; + if (image) { + reverseArrowCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(15, 2)]; + } else { + NSLog(@"Reverse arrow cursor is invalid."); + } } } |