Skip to content

Commit bda13a6

Browse files
committed
fix updater dialog crash
1 parent e21b836 commit bda13a6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

OpenUtau/ViewModels/UpdaterViewModel.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@ public UpdaterViewModel() {
104104
async void Init() {
105105
UpdaterStatus = ThemeManager.GetString("updater.status.checking");
106106
sparkle = await NewUpdaterAsync();
107+
if (sparkle == null) {
108+
UpdaterStatus = ThemeManager.GetString("updater.status.unknown");
109+
return;
110+
}
107111
updateInfo = await sparkle.CheckForUpdatesQuietly();
108112
if (updateInfo == null) {
113+
UpdaterStatus = ThemeManager.GetString("updater.status.unknown");
109114
return;
110115
}
111116
switch (updateInfo.Status) {

0 commit comments

Comments
 (0)