vlc | branch: master | Jean-Baptiste Kempf <[email protected]> | Thu Apr  9 
12:27:11 2015 +0200| [0dce302d4cb74f4f9a2ddebb4a5db315895d58ea] | committer: 
Jean-Baptiste Kempf

Qt: try to fix the crash on start

The changes on preferences association registration, seems to have
attacked the taskbar part

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0dce302d4cb74f4f9a2ddebb4a5db315895d58ea
---

 modules/gui/qt4/main_interface_win32.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/main_interface_win32.cpp 
b/modules/gui/qt4/main_interface_win32.cpp
index cd045cc..bb9e6d2 100644
--- a/modules/gui/qt4/main_interface_win32.cpp
+++ b/modules/gui/qt4/main_interface_win32.cpp
@@ -117,10 +117,11 @@ void MainInterface::createTaskBarButtons()
     FIXME:the play button's picture doesn't changed to pause when clicked
     */
 
-    if( FAILED(CoInitializeEx( NULL, COINIT_MULTITHREADED )) )
-        vlc_assert_unreachable();
+    HRESULT hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
+    if( hr == RPC_E_CHANGED_MODE )
+        hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
 
-    if( S_OK == CoCreateInstance( CLSID_TaskbarList,
+    if( SUCCEEDED(hr) && S_OK == CoCreateInstance( CLSID_TaskbarList,
                 NULL, CLSCTX_INPROC_SERVER,
                 IID_ITaskbarList3,
                 (void **)&p_taskbl) )
@@ -189,7 +190,6 @@ void MainInterface::createTaskBarButtons()
         himl = NULL;
         p_taskbl = NULL;
     }
-
 }
 
 bool MainInterface::winEvent ( MSG * msg, long * result )

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to