From a45b86d2babfc565e85554e1b4c09621112da327 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sun, 31 Jan 2021 09:11:24 -0500 Subject: [PATCH] Fix Coverity warning --- pcbnew/pcb_painter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 300acb5b7f..1fc9fcbb1f 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -246,9 +246,9 @@ COLOR4D PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) cons if( pad ) annularRingLayer = LAYER_PADS_TH; - else if( via->GetViaType() == VIATYPE::MICROVIA ) + else if( via && via->GetViaType() == VIATYPE::MICROVIA ) annularRingLayer = LAYER_VIA_MICROVIA; - else if( via->GetViaType() == VIATYPE::BLIND_BURIED ) + else if( via && via->GetViaType() == VIATYPE::BLIND_BURIED ) annularRingLayer = LAYER_VIA_BBLIND; else annularRingLayer = LAYER_VIA_THROUGH;