Blame SOURCES/0363-tdf-96243-don-t-crash-if-LibO-install.-wasn-t-found.patch

f325b2
From 3f6d5ad9422e8f000527fa6d7650f9fe147242a4 Mon Sep 17 00:00:00 2001
f325b2
From: David Tardon <dtardon@redhat.com>
f325b2
Date: Mon, 7 Dec 2015 13:09:07 +0100
f325b2
Subject: [PATCH 363/398] tdf#96243 don't crash if LibO install. wasn't found
f325b2
f325b2
Change-Id: I538e7238feb711a7d71faf745033264894f688f4
f325b2
(cherry picked from commit 7f73ea2e3975b305e09467eb7980a3d01cd37de9)
f325b2
(cherry picked from commit 125382803df6502e467cb25b6ee70c24d5f4dfc0)
f325b2
---
f325b2
 include/LibreOfficeKit/LibreOfficeKitInit.h | 2 ++
f325b2
 1 file changed, 2 insertions(+)
f325b2
f325b2
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
f325b2
index f18e3ca3c8e4..cb3654808cf9 100644
f325b2
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
f325b2
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
f325b2
@@ -219,6 +219,8 @@ static LibreOfficeKit *lok_init_2( const char *install_path,  const char *user_p
f325b2
     LokHookFunction2 *pSym2;
f325b2
 
f325b2
     dlhandle = lok_dlopen(install_path, &imp_lib);
f325b2
+    if (!dlhandle)
f325b2
+        return NULL;
f325b2
 
f325b2
     pSym2 = (LokHookFunction2 *) lok_dlsym(dlhandle, "libreofficekit_hook_2");
f325b2
     if (!pSym2)
f325b2
-- 
f325b2
2.12.0
f325b2