mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Check pointer before using it.
This commit is contained in:
parent
c6a59f85f9
commit
f8bf956a39
@ -4432,7 +4432,7 @@ finish:
|
|||||||
|
|
||||||
}
|
}
|
||||||
for (i = 0; i < ThemesNum; i++) {
|
for (i = 0; i < ThemesNum; i++) {
|
||||||
if (StriCmp(GlobalConfig.Theme, ThemesList[i]) == 0) {
|
if (GlobalConfig.Theme && StriCmp(GlobalConfig.Theme, ThemesList[i]) == 0) {
|
||||||
OldChosenTheme = i;
|
OldChosenTheme = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1080,12 +1080,15 @@ EFI_STATUS WaitForInputEventPoll(REFIT_MENU_SCREEN* ScreenPtr, UINTN TimeoutDefa
|
|||||||
CheckSyncSound();
|
CheckSyncSound();
|
||||||
}
|
}
|
||||||
TimeoutRemain--;
|
TimeoutRemain--;
|
||||||
if (Screen.mPointer->isAlive()) {
|
if ( Screen.mPointer ) {
|
||||||
Screen.mPointer->UpdatePointer();
|
if (Screen.mPointer->isAlive()) {
|
||||||
Status = Screen.mPointer->CheckMouseEvent(&Screen); //out: gItemID, gAction
|
Screen.mPointer->UpdatePointer();
|
||||||
if (Status != EFI_TIMEOUT) { //this check should return timeout if no mouse events occured
|
Status = Screen.mPointer->CheckMouseEvent(&Screen); //out: gItemID, gAction
|
||||||
break;
|
if (Status != EFI_TIMEOUT) { //this check should return timeout if no mouse events occured
|
||||||
}
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Status;
|
return Status;
|
||||||
|
Loading…
Reference in New Issue
Block a user