X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..abd474ea63667f727940a009cc3e0b23ba9f418f:/src/msw/mediactrl_wmp10.cpp?ds=inline diff --git a/src/msw/mediactrl_wmp10.cpp b/src/msw/mediactrl_wmp10.cpp index 01a10d5740..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(); } } @@ -1452,9 +1456,11 @@ void wxWMP10MediaEvtHandler::OnActiveX(wxActiveXEvent& event) } #endif -// in source file that contains stuff you don't directly use -#include "wx/html/forcelnk.h" -FORCE_LINK_ME(wxmediabackend_wmp10) + +// Allow the user code to use wxFORCE_LINK_MODULE() to ensure that this object +// file is not discarded by the linker. +#include "wx/link.h" +wxFORCE_LINK_THIS_MODULE(wxmediabackend_wmp10) #if 0 // Windows Media Player Mobile 9 hacks