[Libreoffice-commits] core.git: libreofficekit/source
Pranav Kant
pranavk at collabora.com
Sat Feb 13 21:29:56 UTC 2016
libreofficekit/source/gtk/lokdocview.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit f01bac5cc2b54b6df731b45c46187fec12515b46
Author: Pranav Kant <pranavk at collabora.com>
Date: Sun Feb 14 02:53:16 2016 +0530
tdf#97301: Return silently when no document is loaded
Change-Id: Id6cf77ee7597fb992a306649c2f2a3639bf6dad8
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index c7dceaa..742946d 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -2663,6 +2663,9 @@ lok_doc_view_set_zoom (LOKDocView* pDocView, float fZoom)
LOKDocViewPrivate& priv = getPrivate(pDocView);
GError* error = nullptr;
+ if (!priv->m_pDocument)
+ return;
+
// Clamp the input value in [MIN_ZOOM, MAX_ZOOM]
fZoom = fZoom < MIN_ZOOM ? MIN_ZOOM : fZoom;
fZoom = fZoom > MAX_ZOOM ? MAX_ZOOM : fZoom;
More information about the Libreoffice-commits
mailing list