Refactor code based on lib changes

This commit is contained in:
2021-10-24 00:56:39 +01:00
parent bd1bbef22b
commit f5df1b3f9d
5 changed files with 33 additions and 25 deletions
+12 -3
View File
@@ -211,10 +211,19 @@ void MainWindow::loadFile( QString fileName, CalypFileInfo* pStreamInfo )
{
bool opened = false;
if( !pStreamInfo )
if( pStreamInfo != nullptr )
{
try
{
opened = videoSubWindow->loadFile( pStreamInfo );
}
catch( CalypFailure& e )
{
}
}
if( !opened )
opened = videoSubWindow->loadFile( fileName );
else
opened = videoSubWindow->loadFile( pStreamInfo );
if( opened )
{