summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-12-19 22:41:11 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2024-12-19 23:39:41 +0100
commit399f3414a902646e6563cc1679be2bf9f3ccaa51 (patch)
tree01990e469bf372295e0bbeb1c4ff07f69c4c7d48
parent98afe0ad746bef755f4af8d782e8a6c501ad9366 (diff)
sd: Dereference after null check
Since commit 37edf62981acf8b73a70d645755e8cdbc9bbcd3f Author: Gökay Şatır <gokaysatir@collabora.com> Date: Thu Oct 3 17:31:09 2024 +0300 cool#7406: Refactor Impress->getPartInfo & use JsonWriter. Change-Id: Ie84b0a5a04c298348368a4781c0afbd97f748f90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178845 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sd/source/core/sdpage.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 611b867c6c1a..dc5dfbf85aac 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -1773,8 +1773,11 @@ void SdPage::NotifyPagePropertyChanges()
GetPageInfo(jsonWriter);
OString out = jsonWriter.finishAndGetAsOString();
- SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, out);
- SfxViewShell::Current()->NotifyOtherViews(LOK_CALLBACK_STATE_CHANGED, ".uno:PageSetup"_ostr, out);
+ if (SfxViewShell* pViewShell = SfxViewShell::Current())
+ {
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, out);
+ pViewShell->NotifyOtherViews(LOK_CALLBACK_STATE_CHANGED, ".uno:PageSetup"_ostr, out);
+ }
}
void SdPage::SetSize(const Size& aSize)