aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil Hodgson <nyamatongwe@gmail.com>2021-08-05 08:45:47 +1000
committerNeil Hodgson <nyamatongwe@gmail.com>2021-08-05 08:45:47 +1000
commit334c795c94f69a827ac2da6acd8e9ff227a18767 (patch)
tree50991f96749d8f11594006e548b838ee2566bfdc
parentc883de3983aa88cd6bb6236a40c24107205e496a (diff)
downloadscintilla-mirror-334c795c94f69a827ac2da6acd8e9ff227a18767.tar.gz
Log warning if images don't load.
-rw-r--r--cocoa/ScintillaView.mm12
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.");
+ }
}
}