svtools/source/filter/DocumentToGraphicRenderer.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit fe76af877a481d2b6a41f9a2ed837757d6fa0f25 Author: Eike Rathke <er...@redhat.com> Date: Fri Sep 22 14:21:02 2017 +0200 Check availability of XPageCursor Change-Id: I458655d52992e40c2330ec10628fcea0fdc00f76 Reviewed-on: https://gerrit.libreoffice.org/42655 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits