summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-09-22 14:21:02 +0200
committerEike Rathke <erack@redhat.com>2017-09-22 21:54:14 +0200
commitfe76af877a481d2b6a41f9a2ed837757d6fa0f25 (patch)
treeb02510a03160ef904160cc22c04ed773c4fd7fe1
parentd0269808132f83e238cf050c8a013ae6507212e7 (diff)
Check availability of XPageCursor
Change-Id: I458655d52992e40c2330ec10628fcea0fdc00f76 Reviewed-on: https://gerrit.libreoffice.org/42655 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 8bf5120078bc..33ac961f0928 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -226,7 +226,7 @@ sal_Int32 DocumentToGraphicRenderer::getCurrentPageWriter()
if (!xTextViewCursorSupplier.is())
return 1;
Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), UNO_QUERY);
- return xCursor->getPage();
+ return xCursor.is() ? xCursor->getPage() : 1;
}
// static