summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-02-26 11:15:37 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-02-26 06:04:43 +0100
commit3400424877032595490f38711b5e8520ed889fee (patch)
tree970b521dd0c5d18f37362ec53ebd52c3fa80f5e9 /svx/source/unodraw
parent6fa55d39bc43383fcdb3276e9b7f612fa96d1b67 (diff)
xmloff: remove unused code when loading/saving the bitmap table
Change-Id: I6bffe243e813079538a4cb57111266b41d7c03f1 Reviewed-on: https://gerrit.libreoffice.org/50333 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index 86e530a3eca6..a2675cafa5f5 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -625,8 +625,17 @@ std::unique_ptr<XPropertyEntry> SvxUnoXBitmapTable::createEntry(const OUString&
return std::unique_ptr<XPropertyEntry>();
auto xBitmap = rAny.get<uno::Reference<awt::XBitmap>>();
+ if (!xBitmap.is())
+ return nullptr;
+
uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY);
+ if (!xGraphic.is())
+ return nullptr;
+
Graphic aGraphic(xGraphic);
+ if (!aGraphic)
+ return nullptr;
+
GraphicObject aGraphicObject(aGraphic);
return o3tl::make_unique<XBitmapEntry>(aGraphicObject, rName);
}