summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2023-01-26 03:31:24 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-02-02 11:05:15 +0000
commit489d01138c597761e6d32dc5991fd0d0da8b262a (patch)
tree9619c0b8fc8fc24dac295af6ca20b9150a17ac5a /sfx2
parent77f7f28df730d4720188a59e43ea58fc47880975 (diff)
sfx2: fix crash in SfxLokHelper::notifyAllViews(...)
Crashreport signature: program/libmergedlo.so SfxLokHelper::notifyAllViews(int, rtl::OString const&) sfx2/source/view/lokhelper.cxx:682 program/libmergedlo.so SfxClipboardChangeListener::ChangedContents() include/rtl/string.hxx:413 program/libmergedlo.so SfxClipboardChangeListener::LinkStubAsyncExecuteHdl_Impl(void*, void*) include/rtl/ref.hxx:128 program/libmergedlo.so ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) include/rtl/ref.hxx:128 program/libmergedlo.so SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) Change-Id: Ibf70f42292d67a3d6cc68f579ee02f671da85acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146150 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit dc17158c99c8a15fbca57a9a0b0ea7178dcc5a34) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146400 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com> (cherry picked from commit b2bd60b8c1937502857e12b0eea42323fd2353c8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146411 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/lokhelper.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 794dcc00b300..468945076e0c 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -634,6 +634,8 @@ void SfxLokHelper::notifyAllViews(int nType, const OString& rPayload)
const auto payload = rPayload.getStr();
const SfxViewShell* const pCurrentViewShell = SfxViewShell::Current();
+ if (!pCurrentViewShell)
+ return;
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while (pViewShell)
{