Eeschema: Verify file content exists

Fixes: lp:1752724
* https://bugs.launchpad.net/kicad/+bug/1752724
This commit is contained in:
Seth Hillbrand 2018-03-01 14:13:50 -08:00
parent e3c71efbeb
commit 886159347a
1 changed files with 1 additions and 1 deletions

View File

@ -784,7 +784,7 @@ void SCH_LEGACY_PLUGIN::loadHeader( FILE_LINE_READER& aReader, SCH_SCREEN* aScre
{
const char* line = aReader.ReadLine();
if( !strCompare( "Eeschema Schematic File Version", line, &line ) )
if( !line || !strCompare( "Eeschema Schematic File Version", line, &line ) )
{
m_error.Printf( _( "\"%s\" does not appear to be an Eeschema file" ),
GetChars( aScreen->GetFileName() ) );