From 717b1d37bed647ef9dfe6258554ee5f51f999d6b 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 --- 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 19b4806007..126c3e0fec 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();