]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mediactrl.cpp
Fix potential crash, fixes #12375: PATCH to fix help controller crash
[wxWidgets.git] / src / msw / mediactrl.cpp
index 2609f78e4b1633e9344493b85e0bea8bb048f4e9..32adbe983625998b2fc736f623298015e9c1ab2d 100644 (file)
@@ -2193,11 +2193,7 @@ wxAMMediaBackend::~wxAMMediaBackend()
 //---------------------------------------------------------------------------
 void wxAMMediaBackend::Clear()
 {
-    if (m_pTimer)
-    {
-        delete m_pTimer;
-        m_pTimer = NULL;
-    }
+    wxDELETE(m_pTimer);
 }
 
 //---------------------------------------------------------------------------
@@ -3923,11 +3919,7 @@ void wxQTMediaBackend::Cleanup()
 {
     m_bPlaying = false;
 
-    if (m_timer)
-    {
-        delete m_timer;
-        m_timer = NULL;
-    }
+    wxDELETE(m_timer);
 
     m_lib.StopMovie(m_movie);