mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 874391 - Missing nullchecks in nsNativeTheme::IsDarkBackground(nsIFrame*), r=roc
--HG-- extra : rebase_source : e9161f3fbce9b53e4c74314cc94fb9556f7a9548
This commit is contained in:
parent
cffc4ca1cb
commit
123ce9b924
@ -682,11 +682,14 @@ nsNativeTheme::IsRangeHorizontal(nsIFrame* aFrame)
|
||||
bool
|
||||
nsNativeTheme::IsDarkBackground(nsIFrame* aFrame)
|
||||
{
|
||||
nsIScrollableFrame* scrollFrame = aFrame->GetScrollTargetFrame();
|
||||
nsIScrollableFrame* scrollFrame = nullptr;
|
||||
while (!scrollFrame && aFrame) {
|
||||
aFrame = aFrame->GetParent();
|
||||
scrollFrame = aFrame->GetScrollTargetFrame();
|
||||
aFrame = aFrame->GetParent();
|
||||
}
|
||||
if (!scrollFrame)
|
||||
return false;
|
||||
|
||||
nsIFrame* frame = scrollFrame->GetScrolledFrame();
|
||||
nsStyleContext* bgSC;
|
||||
if (nsCSSRendering::FindBackground(frame, &bgSC)) {
|
||||
|
Loading…
Reference in New Issue
Block a user