mirror of
				https://github.com/house-of-abbey/GarminHomeAssistant.git
				synced 2025-11-04 00:48:14 +00:00 
			
		
		
		
	Update HomeAssistantApp.mc
Guard against dereferencing null. Belt & braces, as this has not been an issue.
This commit is contained in:
		@@ -262,6 +262,7 @@ class HomeAssistantApp extends Application.AppBase {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    function startUpdates() {
 | 
					    function startUpdates() {
 | 
				
			||||||
 | 
					        if (mHaMenu != null) {
 | 
				
			||||||
            mItemsToUpdate = mHaMenu.getItemsToUpdate();
 | 
					            mItemsToUpdate = mHaMenu.getItemsToUpdate();
 | 
				
			||||||
            // Start the continuous update process that continues for as long as the application is running.
 | 
					            // Start the continuous update process that continues for as long as the application is running.
 | 
				
			||||||
            // The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
 | 
					            // The chain of functions from 'updateNextMenuItem()' calls 'updateNextMenuItem()' on completion.
 | 
				
			||||||
@@ -269,6 +270,7 @@ class HomeAssistantApp extends Application.AppBase {
 | 
				
			|||||||
                updateNextMenuItemInternal();
 | 
					                updateNextMenuItemInternal();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Callback function after completing the GET request to fetch the API status.
 | 
					    // Callback function after completing the GET request to fetch the API status.
 | 
				
			||||||
    //
 | 
					    //
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user