From 4a210d2981ca4efce101796a039cc43b38ede745 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Tue, 6 Jan 2015 00:29:19 +0000 Subject: [PATCH] Fix disable modules after using an array --- app/VideoSubWindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/VideoSubWindow.cpp b/app/VideoSubWindow.cpp index 6ff9451..b4caef0 100644 --- a/app/VideoSubWindow.cpp +++ b/app/VideoSubWindow.cpp @@ -129,7 +129,7 @@ Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog ) UInt Width = 0, Height = 0, FrameRate = 30; Int InputFormat = -1; - if( !m_pCurrStream ) + if( m_pCurrStream ) m_pCurrStream->getFormat( Width, Height, InputFormat, FrameRate ); if( m_pCurrStream->guessFormat( cFilename, Width, Height, InputFormat, FrameRate ) || bForceDialog ) @@ -234,9 +234,10 @@ Void VideoSubWindow::disableModule( PlaYUVerAppModuleIf* pcModule ) QVector apcCurrentModule = m_apcCurrentModule; for( Int i = 0; i < apcCurrentModule.size(); i++ ) { + m_apcCurrentModule.removeOne( apcCurrentModule.at( i ) ); ModulesHandle::destroyModuleIf( apcCurrentModule.at( i ) ); } - //assert( m_apcCurrentModule.size() == 0 ); + assert( m_apcCurrentModule.size() == 0 ); } refreshFrame(); }