Skip to content

Commit 45cabed

Browse files
committed
Fix crash on m1 devices
1 parent 704bd16 commit 45cabed

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

fusepb/controllers/DebuggerController.m

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,28 +62,24 @@ + (DebuggerController *)singleton
6262
return singleton ? singleton : [[self alloc] init];
6363
}
6464

65-
- (void)habdleCloseNotification: (NSNotificationCenter*)nc
65+
- (void)habdleCloseNotification
6666
{
67-
[nc addObserver:self
67+
[[NSNotificationCenter defaultCenter] addObserver:self
6868
selector:@selector(handleWillClose:)
6969
name:@"NSWindowWillCloseNotification"
7070
object:[self window]];
7171
}
7272

7373
- (id)init
7474
{
75-
NSNotificationCenter *nc;
76-
7775
if ( singleton ) {
7876
[self dealloc];
7977
} else {
8078
[super init];
8179
self = [super initWithWindowNibName:@"Debugger"];
8280
singleton = self;
8381

84-
nc = [NSNotificationCenter defaultCenter];
85-
86-
[self performSelectorOnMainThread:@selector(habdleCloseNotification) withObject:nc waitUntilDone:YES];
82+
[self performSelectorOnMainThread:@selector(habdleCloseNotification) withObject:nil waitUntilDone:YES];
8783
[self setWindowFrameAutosaveName:@"DebuggerWindow"];
8884
}
8985

0 commit comments

Comments
 (0)