[DirectShow] Fix potential memory access violation
authorKonstantin Ritt <ritt.ks@gmail.com>
Sat, 11 Apr 2015 15:33:55 +0000 (19:33 +0400)
committerKonstantin Ritt <ritt.ks@gmail.com>
Mon, 13 Apr 2015 09:58:28 +0000 (09:58 +0000)
Change-Id: I5da495d255e6fdd3a70c1ed486afb61f157c923e
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
src/plugins/directshow/player/directshowiosource.cpp

index 3a4e107..424120f 100644 (file)
@@ -99,6 +99,9 @@ void DirectShowIOSource::setDevice(QIODevice *device)
 
 void DirectShowIOSource::setAllocator(IMemAllocator *allocator)
 {
+    if (m_allocator == allocator)
+        return;
+
     if (m_allocator)
         m_allocator->Release();