Fix rare crash seen when dereferencing backgroundIcon[NONE].
Because backgroundIcon[] is not initialized by the ScreenRecoveryUI
constructor, it should be initialized explicitly to NULL in Init().
If it is not initialized, ScreenRecoveryUI::SetBackground() can fail
for the NONE icon because the NULL test can fail and junk will be
dereferenced.
Change-Id: I4e3738d2e241ed90df43c984fb41e0072933f50a
diff --git a/screen_ui.cpp b/screen_ui.cpp
index 8376341..be7abca 100644
--- a/screen_ui.cpp
+++ b/screen_ui.cpp
@@ -376,6 +376,7 @@
text_cols = gr_fb_width() / char_width;
if (text_cols > kMaxCols - 1) text_cols = kMaxCols - 1;
+ backgroundIcon[NONE] = NULL;
LoadBitmap("icon_installing", &backgroundIcon[INSTALLING_UPDATE]);
backgroundIcon[ERASING] = backgroundIcon[INSTALLING_UPDATE];
LoadBitmap("icon_error", &backgroundIcon[ERROR]);