[Libreoffice-commits] core.git: libreofficekit/source

Pranav Kant pranavk at libreoffice.org
Mon Jan 11 03:24:15 PST 2016


 libreofficekit/source/gtk/lokdocview.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4200a678fb54f0fa5d2f0c26c655252f9267a527
Author: Pranav Kant <pranavk at libreoffice.org>
Date:   Fri Dec 18 22:42:53 2015 +0530

    tdf#96421: Return if no window is realized
    
    Change-Id: I13de7e6eae4e73932e8441ba2e2ad3e4ff888f41
    Reviewed-on: https://gerrit.libreoffice.org/20799
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index fcc170b..c1f550a 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -344,6 +344,8 @@ doSearch(LOKDocView* pDocView, const char* pText, bool bBackwards, bool highligh
     boost::property_tree::ptree aTree;
     GtkWidget* drawingWidget = GTK_WIDGET(pDocView);
     GdkWindow* drawingWindow = gtk_widget_get_window(drawingWidget);
+    if (!drawingWindow)
+        return;
     std::shared_ptr<cairo_region_t> cairoVisRegion( gdk_window_get_visible_region(drawingWindow),
                                                     cairo_region_destroy);
     cairo_rectangle_int_t cairoVisRect;


More information about the Libreoffice-commits mailing list