File gnome-documents-check-ntimeoutid.patch of Package libreoffice.6672

From e567ede54e85200f9e412dfa94a0f7b05c27d32f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 14 Jun 2017 21:18:22 +0100
Subject: [PATCH] Related: rhbz#1444437 check if m_nTimeoutId is valid

Change-Id: I80d850d23ab0e95bb4b105efa5a1ae1e59933a95
---
 libreofficekit/source/gtk/lokdocview.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index a59d72bcc374..ceda8160c9dd 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -246,7 +246,8 @@ struct LOKDocViewPrivateImpl
 
     ~LOKDocViewPrivateImpl()
     {
-        g_source_remove(m_nTimeoutId);
+        if (m_nTimeoutId)
+            g_source_remove(m_nTimeoutId);
     }
 };
 
-- 
2.12.3
openSUSE Build Service is sponsored by