diff options
author | Aleksei Nikiforov <darktemplar@basealt.ru> | 2021-09-20 11:25:45 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-23 11:36:09 +0200 |
commit | 9b4478e62c712ef0f75c4a001e260dfdd6b3ca4c (patch) | |
tree | 908a68900e520be99ebdf6fa1e8ce05eaec36fae /vcl/source/app/svdata.cxx | |
parent | 0044349b4617d90419113d0fea6be5b53c429fc4 (diff) |
tdf#144624 Prevent infinite recursion when loading SVG icon
When Generic/X11 VCL backend plugin loads SVG icon,
it creates virtual device for rasterizing an SVG icon,
which in turn tries to load an SVG icon,
and thus infinite recursion happens.
Change-Id: I7559b6255e6718e64ef4a6e7c79d597375e5823a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122344
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/app/svdata.cxx')
-rw-r--r-- | vcl/source/app/svdata.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 61a766b17e53..c8b0c150297a 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -206,17 +206,17 @@ basegfx::SystemDependentDataManager& ImplGetSystemDependentDataManager() } /// Returns either the application window, or the default GL context window -vcl::Window* ImplGetDefaultWindow() +vcl::Window* ImplGetDefaultWindow(bool bUseIcon) { ImplSVData* pSVData = ImplGetSVData(); if (pSVData->maFrameData.mpAppWin) return pSVData->maFrameData.mpAppWin; else - return ImplGetDefaultContextWindow(); + return ImplGetDefaultContextWindow(bUseIcon); } /// returns the default window created to hold the persistent VCL GL context. -vcl::Window *ImplGetDefaultContextWindow() +vcl::Window *ImplGetDefaultContextWindow(bool bUseIcon) { ImplSVData* pSVData = ImplGetSVData(); @@ -231,7 +231,7 @@ vcl::Window *ImplGetDefaultContextWindow() { SAL_INFO( "vcl", "ImplGetDefaultWindow(): No AppWindow" ); - pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create( nullptr, WB_DEFAULTWIN ); + pSVData->mpDefaultWin = VclPtr<WorkWindow>::Create( nullptr, bUseIcon ? WB_DEFAULTWIN : WB_DEFAULTWIN | WB_NOICON ); pSVData->mpDefaultWin->SetText( "VCL ImplGetDefaultWindow" ); } catch (const css::uno::Exception&) |