summaryrefslogtreecommitdiff
path: root/sd/qa/unit/dialogs-test.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/dialogs-test.cxx')
-rw-r--r--sd/qa/unit/dialogs-test.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 89e036af3442..260b22ce7fc0 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -372,8 +372,9 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID)
aNewAttr.Put(makeSdAttrLayerPrintable());
aNewAttr.Put(makeSdAttrLayerLocked());
aNewAttr.Put(makeSdAttrLayerThisPage());
+ auto const parent = getViewShell()->GetActiveWindow();
pRetval = getSdAbstractDialogFactory()->CreateSdInsertLayerDlg(
- getViewShell()->GetActiveWindow(),
+ parent == nullptr ? nullptr : parent->GetFrameWeld(),
aNewAttr,
true, // alternative: false
SdResId(STR_INSERTLAYER) /* alternative: STR_MODIFYLAYER */);