summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-03-31 15:56:39 -0800
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-01 08:04:38 +0200
commit3b92b0c7a6d6832917fbc5073c3299a1ffe861da (patch)
tree59a7cc5ba1361127873c50fc9b7187f0fcc43827
parent0a893a15b02a3662e3c68776be09534c9f955e4f (diff)
tdf#141405 fix null reference use crash
Change-Id: I90906b7df044c1a139c6187b74d1b4b8210919c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--svx/source/svdraw/svdedtv.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index c49474cf6c20..3470a8d91458 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -1005,8 +1005,8 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser
css::uno::Reference<lang::XServiceInfo> xServices(GetModel()->getUnoModel(),
css::uno::UNO_QUERY);
- if (xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument") ||
- xServices->supportsService("com.sun.star.text.TextDocument"))
+ if (xServices.is() && (xServices->supportsService("com.sun.star.sheet.SpreadsheetDocument") ||
+ xServices->supportsService("com.sun.star.text.TextDocument")))
{
const bool bUndo(IsUndoEnabled());
GetModel()->EnableUndo(false);