mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-08-14 20:27:24 +00:00
Protect from bug/crash when a click in the window would
try to send ADB mouse events to a non-existant emulator
This commit is contained in:
@@ -378,7 +378,11 @@ static NSPoint mouse; // Previous/current mouse location
|
||||
|
||||
- (BOOL) processMouseMove: (NSEvent *) event
|
||||
{
|
||||
NSPoint location;
|
||||
if ( ! drawView )
|
||||
{
|
||||
D(NSLog(@"Unable to process event - Emulator has not started yet"));
|
||||
return NO;
|
||||
}
|
||||
|
||||
if ( fullScreen )
|
||||
{
|
||||
@@ -386,7 +390,7 @@ static NSPoint mouse; // Previous/current mouse location
|
||||
return YES;
|
||||
}
|
||||
|
||||
location = [self convertPoint: [event locationInWindow] fromView:nil];
|
||||
NSPoint location = [self convertPoint: [event locationInWindow] fromView:nil];
|
||||
|
||||
D(NSLog (@"%s - loc.x=%f, loc.y=%f",
|
||||
__PRETTY_FUNCTION__, location.x, location.y));
|
||||
|
Reference in New Issue
Block a user