diff options
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/filter/DocumentToGraphicRenderer.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx index e33a94ec416e..e78b0f1ad8ab 100644 --- a/svtools/source/filter/DocumentToGraphicRenderer.cxx +++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx @@ -148,6 +148,8 @@ Graphic DocumentToGraphicRenderer::renderToGraphic( sal_Int32 DocumentToGraphicRenderer::getCurrentPageWriter() { Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(mxModel->getCurrentController(), UNO_QUERY); + if (!xTextViewCursorSupplier.is()) + return 1; Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), UNO_QUERY); return xCursor->getPage(); } |