Fix: crashes on opening launcher settings ingame

Exception type: NSInvalidArgumentException
Reason: *** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]
This commit is contained in:
Duy Tran Khanh authored and GitHub committed 2023-03-25 10:00:01 +07:00
1 parent 36fd10c80c
commit d932ef8152
1 file changed
+3 -1
+3 -1
View File
@@ -434,7 +434,9 @@ typedef void(^CreateView)(UITableViewCell *, NSString *, NSDictionary *);
];
self.title = localize(@"Settings", nil);
self.navigationItem.rightBarButtonItems = @[[sidebarViewController drawAccountButton], [self drawHelpButton]];
if (self.navigationController) {
self.navigationItem.rightBarButtonItems = @[[sidebarViewController drawAccountButton], [self drawHelpButton]];
}
}
- (UIBarButtonItem *)drawHelpButton {