[vlc-commits] Qt4: allow either COM model for associations (fixes #14323)

Rémi Denis-Courmont git at videolan.org
Wed Apr 8 18:00:16 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr  8 18:58:18 2015 +0300| [656562f3077f3520d09b3ec4071ff3c121635980] | committer: Rémi Denis-Courmont

Qt4: allow either COM model for associations (fixes #14323)

The model does not matter here as affected objects do not outlive the
function call and are not used across threads. Still the references
counter of the apartment must remain balanced.

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

 modules/gui/qt4/components/simple_preferences.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
index 2a93bb0..813c8da 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -1256,6 +1256,8 @@ void SPrefsPanel::assoDialog()
     HRESULT hr;
 
     hr = CoInitializeEx( NULL, COINIT_MULTITHREADED );
+    if( hr == RPC_E_CHANGED_MODE )
+        CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
     if( SUCCEEDED(hr) )
     {
         void *p;



More information about the vlc-commits mailing list