Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[embedlite] Check for null GetApzcTreeManager(). Contributes to JB#49875
This causes a crash with jolla-email unless the null pointer is checked
and filtered out. Every other instance of GetApzcTreeManager() seems to
be checked already, so it seems like a sensible precaution.
  • Loading branch information
llewelld committed May 15, 2020
1 parent 4d4b1eb commit 0877be6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions rpm/0018-Check-for-null-GetApzcTreeManager.patch
@@ -0,0 +1,29 @@
From ebfdcbad208fa904a6f16e10a33dfb515bb34d3e Mon Sep 17 00:00:00 2001
From: David Llewellyn-Jones <david.llewellyn-jones@jolla.com>
Date: Thu, 14 May 2020 15:03:00 +0300
Subject: [PATCH] [embedlite] Check for null GetApzcTreeManager(). Contributes
to JB#49875

This causes a crash with jolla-email unless the null pointer is checked
and filtered out. Every other instance of GetApzcTreeManager() seems to
be checked already, so it seems like a sensible precaution.
---
embedding/embedlite/embedshared/EmbedLiteViewBaseParent.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/embedding/embedlite/embedshared/EmbedLiteViewBaseParent.cpp b/embedding/embedlite/embedshared/EmbedLiteViewBaseParent.cpp
index e5939be5c0d1..2f1982b77e90 100644
--- a/embedding/embedlite/embedshared/EmbedLiteViewBaseParent.cpp
+++ b/embedding/embedlite/embedshared/EmbedLiteViewBaseParent.cpp
@@ -81,7 +81,7 @@ EmbedLiteViewBaseParent::UpdateScrollController()

if (mCompositor) {
mRootLayerTreeId = mCompositor->RootLayerTreeId();
- if (mDPI > 0) {
+ if ((mDPI > 0) && GetApzcTreeManager()) {
GetApzcTreeManager()->SetDPI(mDPI);
}
CompositorBridgeParent::SetControllerForLayerTree(mRootLayerTreeId, mContentController);
--
2.17.1

1 change: 1 addition & 0 deletions rpm/xulrunner-qt5.spec
Expand Up @@ -60,6 +60,7 @@ Patch14: 0014-gecko-Use-MOZ_EMBEDLITE-for-embedlite-integration.patch
Patch15: 0015-gecko-Create-EmbedLiteCompositorBridgeParent-in-Comp.patch
Patch16: 0016-gecko-Configuration-option.-JB-49613.patch
Patch17: 0017-ffmpeg4.patch
Patch18: 0018-Check-for-null-GetApzcTreeManager.patch

BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Network)
Expand Down

0 comments on commit 0877be6

Please sign in to comment.