From 2e0def86708ab1769b9822f8416fd134a739623b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 10 May 2019 19:59:44 +0100 Subject: [PATCH] Defensive coding that will possibly fix a crash when scrolling through footprints. Fixes: lp:1828289 * https://bugs.launchpad.net/kicad/+bug/1828289 (cherry picked from commit 717b1d37bed647ef9dfe6258554ee5f51f999d6b) --- cvpcb/cvpcb_mainframe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cvpcb/cvpcb_mainframe.cpp b/cvpcb/cvpcb_mainframe.cpp index 9620349397..f0b1277046 100644 --- a/cvpcb/cvpcb_mainframe.cpp +++ b/cvpcb/cvpcb_mainframe.cpp @@ -816,7 +816,8 @@ void CVPCB_MAINFRAME::CreateScreenCmp() fpframe->Raise(); // Make sure that is visible. Raise(); // .. but still we want the focus. - focus->SetFocus(); + if( focus ) + focus->SetFocus(); } fpframe->InitDisplay();