summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libreofficekit/source/gtk/lokdocview.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.c b/libreofficekit/source/gtk/lokdocview.c
index f813e6894eac..12b004e08d35 100644
--- a/libreofficekit/source/gtk/lokdocview.c
+++ b/libreofficekit/source/gtk/lokdocview.c
@@ -161,7 +161,11 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, c
SAL_DLLPUBLIC_EXPORT void lok_docview_set_zoom ( LOKDocView* pDocView, float fZoom )
{
pDocView->fZoom = fZoom;
- renderDocument( pDocView );
+
+ if ( pDocView->pDocument )
+ {
+ renderDocument( pDocView );
+ }
// TODO: maybe remember and reset positiong?
}