Ensure filetype is not null before using open command, Fixed if statements to follow coding guidelines

This commit is contained in:
Simon Wells 2016-01-01 20:51:50 +13:00
parent 57d4c90055
commit 0d9ffb11fa
1 changed files with 7 additions and 4 deletions

View File

@ -358,7 +358,10 @@ bool OpenPDF( const wxString& file )
else
{
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension( wxT( "pdf" ) );
if( filetype )
command = filetype->GetOpenCommand( filename );
delete filetype;
}