From 808a7d94833f1a2aa50ac8efac2411b2e22d2bc7 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 9 Oct 2018 09:05:14 -0700 Subject: [PATCH] pcbnew: Fix crash when GAL fallback fails in some cases --- pcbnew/pcb_draw_panel_gal.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcb_draw_panel_gal.cpp b/pcbnew/pcb_draw_panel_gal.cpp index 557dac11b0..b99e9f0d15 100644 --- a/pcbnew/pcb_draw_panel_gal.cpp +++ b/pcbnew/pcb_draw_panel_gal.cpp @@ -386,7 +386,9 @@ void PCB_DRAW_PANEL_GAL::OnShow() // Fallback to software renderer DisplayError( frame, e.what() ); bool use_gal = SwitchBackend( GAL_TYPE_CAIRO ); - frame->UseGalCanvas( use_gal ); + + if( frame ) + frame->UseGalCanvas( use_gal ); } if( frame )