summaryrefslogtreecommitdiff
path: root/image
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-10-26 08:05:04 +0000
committerMoonchild <moonchild@palemoon.org>2022-10-26 08:05:04 +0000
commit1139e11f3a793f3f7fb3905bf0879b8af252773f (patch)
tree6f29f281b0930f6b3b574b40181ed9eb92f03a4b /image
parentb19541f1d47aaead74d0a7dafd8bc7502fbeded4 (diff)
downloaduxp-1139e11f3a793f3f7fb3905bf0879b8af252773f.tar.gz
[No issue] Hold some strong references on nsRefreshDriver
Diffstat (limited to 'image')
-rw-r--r--image/SVGDocumentWrapper.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/image/SVGDocumentWrapper.cpp b/image/SVGDocumentWrapper.cpp
index d4b71b907c..6438c179e4 100644
--- a/image/SVGDocumentWrapper.cpp
+++ b/image/SVGDocumentWrapper.cpp
@@ -212,9 +212,12 @@ SVGDocumentWrapper::TickRefreshDriver()
nsCOMPtr<nsIPresShell> presShell;
mViewer->GetPresShell(getter_AddRefs(presShell));
if (presShell) {
- nsPresContext* presContext = presShell->GetPresContext();
+ RefPtr<nsPresContext> presContext = presShell->GetPresContext();
if (presContext) {
- presContext->RefreshDriver()->DoTick();
+ RefPtr<nsRefreshDriver> driver = presContext->RefreshDriver();
+ if (driver) {
+ driver->DoTick();
+ }
}
}
}