From ea005bc94dc9bd5a5da205ddddf8818586d441d0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 1 Oct 2015 16:03:20 +0200 Subject: [PATCH] Fixed crash on disabling all layers in the pad properties window. --- pcbnew/class_pad.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 2e8795176f..ef9250082e 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -967,7 +967,7 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const { wxString msg; msg.Printf( wxT( "footprint %s, pad %s: could not find valid layer for pad" ), - GetParent()->GetReference(), + GetParent() ? GetParent()->GetReference() : "", GetPadName().IsEmpty() ? "(unnamed)" : GetPadName() ); wxLogWarning( msg ); }