From 009ff3605b43f80b4b842e7a56192c74c9d0f29b Mon Sep 17 00:00:00 2001 From: MikeBeaton Date: Sat, 15 Jan 2022 16:06:06 +0000 Subject: [PATCH] OpenCanopy: Allow for missing mouse support in password verify Closes: https://github.com/acidanthera/bugtracker/issues/1925 --- Changelog.md | 5 +++-- Platform/OpenCanopy/Views/Password.c | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Changelog.md b/Changelog.md index 7d8900be..0884b31a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,8 +2,9 @@ OpenCore Changelog ================== #### v0.7.8 - Updated ocvalidate to warn about insecure `DmgLoading` with secure `SecureBootModel` (already disallowed in runtime) -- Fixed AudioDxe not disabling unused channels after 0.7.7 updates -- Allow gain to track OS volume on old macOS without SystemAudioVolumeDB +- Fixed AudioDxe not disabling unused channels after recent updates +- Allow gain to track OS volume on old macOS without `SystemAudioVolumeDB` +- Fixed crash on no mouse support when verifying password #### v0.7.7 - Fixed rare crash caused by register corruption in the entry point diff --git a/Platform/OpenCanopy/Views/Password.c b/Platform/OpenCanopy/Views/Password.c index 081c8807..5ce8e38b 100644 --- a/Platform/OpenCanopy/Views/Password.c +++ b/Platform/OpenCanopy/Views/Password.c @@ -184,7 +184,9 @@ InternalConfirmPassword ( CONST OC_PRIVILEGE_CONTEXT *Privilege; GUI_PTR_POSITION PtrPosition; - GuiPointerGetPosition (mPointerContext, &PtrPosition); + if (mPointerContext != NULL) { + GuiPointerGetPosition (mPointerContext, &PtrPosition); + } Privilege = Context->PickerContext->PrivilegeContext; @@ -195,8 +197,10 @@ InternalConfirmPassword ( ); GuiKeyReset (mKeyContext); - GuiPointerReset (mPointerContext); - GuiPointerSetPosition (mPointerContext, &PtrPosition); + if (mPointerContext != NULL) { + GuiPointerReset (mPointerContext); + GuiPointerSetPosition (mPointerContext, &PtrPosition); + } DrawContext->CursorOpacity = 0xFF; SecureZeroMem (mPasswordBox.PasswordInfo.Password, mPasswordBox.PasswordInfo.PasswordLen); -- GitLab