cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7b3332ddf40e388901ef145cfbdafb265b44b103

commit 7b3332ddf40e388901ef145cfbdafb265b44b103
Author: Adrien Nader <adr...@notk.org>
Date:   Sat Apr 18 17:24:53 2015 +0200

    ecore_win32: don't fail if OleInitialize() had been called before.
---
 src/lib/ecore_win32/ecore_win32_dnd.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_win32/ecore_win32_dnd.c 
b/src/lib/ecore_win32/ecore_win32_dnd.c
index 6c5253a..a99d26c 100755
--- a/src/lib/ecore_win32/ecore_win32_dnd.c
+++ b/src/lib/ecore_win32/ecore_win32_dnd.c
@@ -61,14 +61,20 @@ static HANDLE DataToHandle(const char *data, int size)
 EAPI int
 ecore_win32_dnd_init()
 {
+   HRESULT res;
+
    if (_ecore_win32_dnd_init_count > 0)
      {
-       _ecore_win32_dnd_init_count++;
-       return _ecore_win32_dnd_init_count;
+        _ecore_win32_dnd_init_count++;
+        return _ecore_win32_dnd_init_count;
      }
 
-   if (OleInitialize(NULL) != S_OK)
-     return 0;
+   res = OleInitialize(NULL);
+   if ((res != S_OK) && (res != S_FALSE))
+     {
+        EINA_LOG_ERR("OleInitialize(NULL) returned %ld.", (long) res);
+        return 0;
+     }
 
    _ecore_win32_dnd_init_count++;
 

-- 


Reply via email to