summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Barron <jason.barron@nokia.com>2012-09-04 10:47:04 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-04 11:31:16 +0200
commitbc2bce3629e93392de9e3272f65cabb8f8b0121f (patch)
treeb45c815a44fb0811ac4fb5f3f959eb9abd1d2752
parentc15b2833bad91d26ccacf49047d935664fb341e5 (diff)
WMF Backend: Fix crash in MFPlayerService::releaseControl.
When releasing a video render control or a video window control, we were deleting the object pointed to by the 'control' pointer, but were not setting this pointer to 0 which left it dangling. Shortly after we tried to cast this dangling pointer to another type which crashed. The solution is just to return after deleting the control. Change-Id: I9ab672c8b86a13af889d87c76141e6b8db5b74a7 Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
-rw-r--r--src/plugins/wmf/player/mfplayerservice.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/wmf/player/mfplayerservice.cpp b/src/plugins/wmf/player/mfplayerservice.cpp
index 7e458123d..4bb8d0d37 100644
--- a/src/plugins/wmf/player/mfplayerservice.cpp
+++ b/src/plugins/wmf/player/mfplayerservice.cpp
@@ -135,10 +135,12 @@ void MFPlayerService::releaseControl(QMediaControl *control)
m_videoRendererControl->setSurface(0);
delete m_videoRendererControl;
m_videoRendererControl = 0;
+ return;
#if defined(HAVE_WIDGETS) && !defined(Q_WS_SIMULATOR)
} else if (control == m_videoWindowControl) {
delete m_videoWindowControl;
m_videoWindowControl = 0;
+ return;
#endif
}