[DirectShow] Fix potential memory access violation

Change-Id: I5da495d255e6fdd3a70c1ed486afb61f157c923e
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Konstantin Ritt
2015-04-11 19:33:55 +04:00
parent 740f16ac60
commit 277d104faa

View 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();