summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@digia.com>2014-09-25 07:15:25 +0200
committerYoann Lopes <yoann.lopes@digia.com>2014-09-30 09:20:56 +0200
commitb3d88c66be2ba6a6975cd3dd152a40fe429ecb6c (patch)
tree8b868ee5725a641f6b7fcf401cd754fbee117e01 /src
parentb6e1c004142d64a1cb2f83f9928cd2bbadaf0914 (diff)
WMF: Fix null ptr derefernce in MFPlayerSession.
Checking the sender of the mediaSourceReady signal to prevent accessing the incorrect source resolver. When the source resolver has finished the asynchronous operation and the source resolver gets recreated in the player at the same time in a different thread the signal mediaSourceReady still gets emitted from the old source resolver. The player assumes that the signal was emitted from the current source resolver and accesses the unresolved media source in the handleMediaSourceReady slot. Task-number: QTBUG-39980 Change-Id: Ic52f6918995aac250048d91f89c520cfea111bd0 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/wmf/player/mfplayersession.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index 0de0bdfd8..2d4f46b1d 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -250,7 +250,7 @@ void MFPlayerSession::handleSourceError(long hr)
void MFPlayerSession::handleMediaSourceReady()
{
- if (QMediaPlayer::LoadingMedia != m_status || !m_sourceResolver)
+ if (QMediaPlayer::LoadingMedia != m_status || !m_sourceResolver || m_sourceResolver != sender())
return;
#ifdef DEBUG_MEDIAFOUNDATION
qDebug() << "handleMediaSourceReady";