Skip to content

Commit

Permalink
fix: Don't check panelCntlPtr for null on Catalina
Browse files Browse the repository at this point in the history
Fixes 0a0cdc4
  • Loading branch information
VisualEhrmanntraut committed Oct 8, 2024
1 parent 0a0cdc4 commit 1f46e2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion NootedRed/X6000FB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,10 @@ IOReturn X6000FB::wrapSetAttributeForConnection(IOService *framebuffer, IOIndex

callback->curPwmBacklightLvl = static_cast<UInt32>(value);

if (callback->panelCntlPtr == nullptr || callback->embeddedPanelLink == nullptr) { return kIOReturnNoDevice; }
if ((NRed::callback->attributes.isBigSurAndLater() && callback->panelCntlPtr == nullptr) ||
callback->embeddedPanelLink == nullptr) {
return kIOReturnNoDevice;
}

if (callback->maxPwmBacklightLvl == 0) { return kIOReturnInternalError; }

Expand Down

0 comments on commit 1f46e2b

Please sign in to comment.