From 74d7369b4f68ebdee7470c9205aebb5021521fb3 Mon Sep 17 00:00:00 2001 From: zhen-zen <66577170+zhen-zen@users.noreply.github.com> Date: Sun, 16 May 2021 22:59:28 -0700 Subject: [PATCH] Fix fallback panel handling (#10) --- BrightnessKeys/BrightnessKeys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BrightnessKeys/BrightnessKeys.cpp b/BrightnessKeys/BrightnessKeys.cpp index 830e694..fb72db5 100644 --- a/BrightnessKeys/BrightnessKeys.cpp +++ b/BrightnessKeys/BrightnessKeys.cpp @@ -111,7 +111,7 @@ void BrightnessKeys::getBrightnessPanel() { // // Some vendors just won't follow the specs and update their code // - if (strncmp(_panel->getName(), "DD02", strlen("DD02"))) { + if (_panel == nullptr || strncmp(_panel->getName(), "DD02", strlen("DD02"))) { auto fallbackPanel = info->videoBuiltin->childFromPath("DD02", gIODTPlane); if (fallbackPanel != nullptr) { _panelFallback = getAcpiDevice(fallbackPanel);