diff options
author | Pranav Kant <pranavk@libreoffice.org> | 2015-12-18 22:42:53 +0530 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-01-11 11:23:50 +0000 |
commit | 4200a678fb54f0fa5d2f0c26c655252f9267a527 (patch) | |
tree | c8d0a23a5196d29a1711f4113cd3c13846eb0ddd /libreofficekit | |
parent | 080a9c3a5107347a74bb17bad185d418561d9d77 (diff) |
tdf#96421: Return if no window is realized
Change-Id: I13de7e6eae4e73932e8441ba2e2ad3e4ff888f41
Reviewed-on: https://gerrit.libreoffice.org/20799
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/source/gtk/lokdocview.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index fcc170bde3fb..c1f550ae2829 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; |