summaryrefslogtreecommitdiff
path: root/forms/source/component/ImageControl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/component/ImageControl.cxx')
-rw-r--r--forms/source/component/ImageControl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 1f0c99bdf5e7..8e76aefc7d52 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -774,8 +774,9 @@ bool OImageControlControl::implInsertGraphics()
try
{
Reference< XWindowPeer > xWindowPeer = getPeer();
+ VclPtr<vcl::Window> xWin = VCLUnoHelper::GetWindow(xWindowPeer);
::sfx2::FileDialogHelper aDialog(TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic,
- VCLUnoHelper::GetWindow(xWindowPeer));
+ xWin ? xWin->GetFrameWeld() : nullptr);
aDialog.SetTitle( sTitle );
Reference< XFilePickerControlAccess > xController( aDialog.GetFilePicker(), UNO_QUERY_THROW );