X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6161dd2d48262bffde5e97d2e6704b760af18add..1680c3561bc4f44c63a026e0d1a5324a39336156:/src/msw/mediactrl_wmp10.cpp?ds=inline

diff --git a/src/msw/mediactrl_wmp10.cpp b/src/msw/mediactrl_wmp10.cpp
index fcc76a9219..2cfdb85e26 100644
--- a/src/msw/mediactrl_wmp10.cpp
+++ b/src/msw/mediactrl_wmp10.cpp
@@ -724,7 +724,9 @@ wxWMP10MediaBackend::wxWMP10MediaBackend()
 #ifndef WXTEST_ATL
                 m_pAX(NULL),
 #endif
-                m_pWMPPlayer(NULL)
+                m_pWMPPlayer(NULL),
+                m_pWMPSettings(NULL),
+                m_pWMPControls(NULL)
 
 {
     m_evthandler = NULL;
@@ -752,8 +754,10 @@ wxWMP10MediaBackend::~wxWMP10MediaBackend()
 #endif
 
         m_pWMPPlayer->Release();
-        m_pWMPSettings->Release();
-        m_pWMPControls->Release();
+        if (m_pWMPSettings)
+            m_pWMPSettings->Release();
+        if (m_pWMPControls)
+            m_pWMPControls->Release();
     }
 }