[DirectShow] Fix potential memory access violation
Change-Id: I5da495d255e6fdd3a70c1ed486afb61f157c923e Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user