diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 94ed5c7c2ac..7f98f67a1ba 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1098,7 +1098,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr) NSUInteger tabletEvent; //Handle tablet events combined with mouse events - switch ([event subtype]) { + @try { + switch ([event subtype]) { case NX_SUBTYPE_TABLET_POINT: tabletEvent = NSTabletPoint; break; @@ -1109,7 +1110,13 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr) default: tabletEvent = [event type]; break; + } } + @catch (NSException * e) { + //FIXME: check why we get such exceptions when using a tablet + return GHOST_kFailure; + } + switch (tabletEvent) { case NSTabletPoint: