Eeschema: fix a crash when invoking eeschema.exe with 2 filenames to open

Fix also a minor compil warning
This commit is contained in:
jean-pierre charras 2022-10-04 16:56:13 +02:00
parent 524a43f95e
commit 4611817f25
2 changed files with 2 additions and 2 deletions

View File

@ -464,7 +464,7 @@ bool PGM_SINGLE_TOP::OnPgmInit()
launcher.
*/
for( size_t i = 1; i < App().argc; i++ )
for( int i = 1; i < App().argc; i++ )
fileArgs.push_back( App().argv[i] );
// special attention to a single argument: argv[1] (==argSet[0])

View File

@ -135,7 +135,7 @@ COLOR4D SCH_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons
bool SCH_RENDER_SETTINGS::GetShowPageLimits() const
{
return eeconfig()->m_Appearance.show_page_limits;
return eeconfig() && eeconfig()->m_Appearance.show_page_limits;
}