From fb2dd912509e74b1978e390c43cf6706eab44be8 Mon Sep 17 00:00:00 2001 From: Wang Hua Date: Thu, 30 May 2019 18:38:18 +0800 Subject: [PATCH] Fix 10.14.x crash --- DataController.mm | 10 ++++++---- machoview.xcodeproj/project.pbxproj | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/DataController.mm b/DataController.mm index 646d7ea..89c0e58 100644 --- a/DataController.mm +++ b/DataController.mm @@ -1203,10 +1203,12 @@ - (void)updateTableView //----------------------------------------------------------------------------- - (void)updateStatus: (NSString *)status { - NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; - [nc postNotificationName:MVThreadStateChangedNotification - object:self - userInfo:[NSDictionary dictionaryWithObject:status forKey:MVStatusUserInfoKey]]; + dispatch_async(dispatch_get_main_queue(), ^{ + NSNotificationCenter * nc = [NSNotificationCenter defaultCenter]; + [nc postNotificationName:MVThreadStateChangedNotification + object:self + userInfo:[NSDictionary dictionaryWithObject:status forKey:MVStatusUserInfoKey]]; + }); } @end diff --git a/machoview.xcodeproj/project.pbxproj b/machoview.xcodeproj/project.pbxproj index afa40ac..d9d87e8 100644 --- a/machoview.xcodeproj/project.pbxproj +++ b/machoview.xcodeproj/project.pbxproj @@ -686,6 +686,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_TEMP_DIR = "$(inherited)"; @@ -726,7 +727,7 @@ ); PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = MachOView; - SDKROOT = macosx10.9; + SDKROOT = macosx; USER_HEADER_SEARCH_PATHS = ""; VALID_ARCHS = "$(inherited)"; VERSIONING_SYSTEM = ""; @@ -738,6 +739,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_OBJC_ARC = YES; COMBINE_HIDPI_IMAGES = YES; CONFIGURATION_TEMP_DIR = "$(inherited)"; @@ -781,7 +783,7 @@ ); PRIVATE_HEADERS_FOLDER_PATH = ""; PRODUCT_NAME = MachOView; - SDKROOT = macosx10.9; + SDKROOT = macosx; SKIP_INSTALL = NO; USER_HEADER_SEARCH_PATHS = ""; VALID_ARCHS = "$(inherited)";