tdf#125370 Fix crash when opening basic editor

Change-Id: I036a0e58bb763912f6ed0df0c964331754756628
Reviewed-on: https://gerrit.libreoffice.org/72609
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index b786552..c8c6b73 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -217,7 +217,7 @@ void Window::CallEventListeners( VclEventId nEvent, void* pData )

    // If maEventListeners is empty, the XVCLWindow has not yet been initialized.
    // Calling GetComponentInterface will do that.
    if (mpWindowImpl->maEventListeners.empty())
    if (mpWindowImpl->maEventListeners.empty() && pData)
        xWindow->GetComponentInterface();

    if (!mpWindowImpl->maEventListeners.empty())