summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qt5/QtFrame.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index d4a43fc7a544..7c1ff38cb8cd 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -350,6 +350,14 @@ void QtFrame::SetTitle(const OUString& rTitle)
void QtFrame::SetIcon(sal_uInt16 nIcon)
{
+ QtInstance* pSalInst(GetQtInstance());
+ assert(pSalInst);
+ if (!pSalInst->IsMainThread())
+ {
+ pSalInst->RunInMainThread([this, nIcon]() { SetIcon(nIcon); });
+ return;
+ }
+
if (m_nStyle
& (SalFrameStyleFlags::PLUG | SalFrameStyleFlags::SYSTEMCHILD
| SalFrameStyleFlags::FLOAT | SalFrameStyleFlags::INTRO