mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-17 20:08:33 +00:00
Update HomeAssistantApp.mc
Guard against dereferencing null. Belt & braces, as this has not been an issue.
This commit is contained in:
@ -262,11 +262,13 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startUpdates() {
|
function startUpdates() {
|
||||||
mItemsToUpdate = mHaMenu.getItemsToUpdate();
|
if (mHaMenu != null) {
|
||||||
// Start the continuous update process that continues for as long as the application is running.
|
mItemsToUpdate = mHaMenu.getItemsToUpdate();
|
||||||
// The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
|
// Start the continuous update process that continues for as long as the application is running.
|
||||||
if (mItemsToUpdate.size() > 0) {
|
// The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
|
||||||
updateNextMenuItemInternal();
|
if (mItemsToUpdate.size() > 0) {
|
||||||
|
updateNextMenuItemInternal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user