From 4611817f250abfd77f040c4adbda3030f8c07dea Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 4 Oct 2022 16:56:13 +0200 Subject: [PATCH] Eeschema: fix a crash when invoking eeschema.exe with 2 filenames to open Fix also a minor compil warning --- common/single_top.cpp | 2 +- eeschema/sch_painter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/single_top.cpp b/common/single_top.cpp index b3b9a078d7..a81f38a138 100644 --- a/common/single_top.cpp +++ b/common/single_top.cpp @@ -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]) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index dfc09c47af..f96c5e6d3d 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -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; }