diff --git a/support/hololens/ServoApp/DefaultUrl.h b/support/hololens/ServoApp/DefaultUrl.h index ba1719dc530..e2912b524a5 100644 --- a/support/hololens/ServoApp/DefaultUrl.h +++ b/support/hololens/ServoApp/DefaultUrl.h @@ -1,5 +1,7 @@ #pragma once +#define FALLBACK_DEFAULT_URL L"https://servo.org/hl-home/" + // For development purpose. // Will override shell.homepage preference: // #define OVERRIDE_DEFAULT_URL L"data:text/html," diff --git a/support/hololens/ServoApp/ServoControl/Servo.cpp b/support/hololens/ServoApp/ServoControl/Servo.cpp index 293fcb0d9dc..3496610ed86 100644 --- a/support/hololens/ServoApp/ServoControl/Servo.cpp +++ b/support/hololens/ServoApp/ServoControl/Servo.cpp @@ -327,7 +327,9 @@ void Servo::GoHome() { ApplicationDataContainer localSettings = ApplicationData::Current().LocalSettings(); auto prefs = localSettings.Containers().Lookup(L"servoUserPrefs"); - auto home = unbox_value(prefs.Values().Lookup(L"shell.homepage")); + auto home_pref = prefs.Values().Lookup(L"shell.homepage"); + auto home = + home_pref ? unbox_value(home_pref) : FALLBACK_DEFAULT_URL; LoadUri(home); }