Ensure filetype is not null before using open command, Fixed if statements to follow coding guidelines
This commit is contained in:
parent
57d4c90055
commit
0d9ffb11fa
|
@ -358,7 +358,10 @@ bool OpenPDF( const wxString& file )
|
|||
else
|
||||
{
|
||||
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension( wxT( "pdf" ) );
|
||||
|
||||
if( filetype )
|
||||
command = filetype->GetOpenCommand( filename );
|
||||
|
||||
delete filetype;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue