From 334c795c94f69a827ac2da6acd8e9ff227a18767 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Thu, 5 Aug 2021 08:45:47 +1000 Subject: Log warning if images don't load. --- cocoa/ScintillaView.mm | 12 ++++++++++-- 1 file 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."); + } } } -- cgit v1.2.3