mirror of
https://github.com/electron/electron.git
synced 2026-01-28 08:48:14 -05:00
It's safe to send message to nil.
This commit is contained in:
@@ -21,8 +21,11 @@ namespace {
|
||||
static SQRLUpdater* g_updater = nil;
|
||||
|
||||
static void RelaunchToInstallUpdate() {
|
||||
if (g_updater != nil)
|
||||
[g_updater relaunchToInstallUpdate];
|
||||
[[g_updater relaunchToInstallUpdate] subscribeError:^(NSError* error) {
|
||||
AutoUpdaterDelegate* delegate = AutoUpdater::GetDelegate();
|
||||
if (delegate)
|
||||
delegate->OnError(base::SysNSStringToUTF8(error.localizedDescription));
|
||||
}];
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -67,9 +70,7 @@ void AutoUpdater::SetFeedURL(const std::string& feed) {
|
||||
|
||||
// static
|
||||
void AutoUpdater::CheckForUpdates() {
|
||||
if (g_updater != nil) {
|
||||
[g_updater.checkForUpdatesCommand execute:nil];
|
||||
}
|
||||
[g_updater.checkForUpdatesCommand execute:nil];
|
||||
}
|
||||
|
||||
} // namespace auto_updater
|
||||
|
||||
Reference in New Issue
Block a user