From d979f0a8c8cecb37d731c00d128627f711a83ce0 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 15 Jun 2020 20:38:37 +0200 Subject: [PATCH] Make sure we correctly construct underlying base platform theme When the base platform theme is not set to a null pointer, then we might assume it has been already constructed and later on try to access an invalid address which will cause a crash. Pick-to: 5.15 Change-Id: I6187336bca527e1feeb0902bcfb16f2fbec86d24 Reviewed-by: Thiago Macieira --- .../platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp index 30c43b67dc..fb324afbd8 100644 --- a/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp +++ b/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.cpp @@ -65,7 +65,7 @@ public: delete baseTheme; } - QPlatformTheme *baseTheme; + QPlatformTheme *baseTheme = nullptr; uint fileChooserPortalVersion = 0; };