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

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


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr  8 18:58:18 2015 +0300| [2234e22d6ede24c1eac4b79e3b269b0a76cacb7c] | committer: Jean-Baptiste Kempf

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.

(cherry picked from commit 656562f3077f3520d09b3ec4071ff3c121635980)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=2234e22d6ede24c1eac4b79e3b269b0a76cacb7c
---

 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 605012f..a09e03e 100644
--- a/modules/gui/qt4/components/simple_preferences.cpp
+++ b/modules/gui/qt4/components/simple_preferences.cpp
@@ -1269,6 +1269,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