From 27b4f2fbe9b25750621b3b0a12cfb574452b58bd Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 17 Feb 2019 07:46:21 -0800 Subject: [PATCH] pcbnew: Fix incorrect Type settings Fixes: lp:1816259 * https://bugs.launchpad.net/kicad/+bug/1816259 --- pcbnew/class_module.h | 2 +- pcbnew/netinfo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 3593b21341..7f1df4b58e 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -116,7 +116,7 @@ public: static inline bool ClassOf( const EDA_ITEM* aItem ) { - return PCB_MODULE_T == aItem->Type(); + return aItem && PCB_MODULE_T == aItem->Type(); } MODULE* Next() const { return static_cast( Pnext ); } diff --git a/pcbnew/netinfo.h b/pcbnew/netinfo.h index 48bc83d26d..f4ba5d6693 100644 --- a/pcbnew/netinfo.h +++ b/pcbnew/netinfo.h @@ -93,7 +93,7 @@ public: static inline bool ClassOf( const EDA_ITEM* aItem ) { - return aItem && PCB_T == aItem->Type(); + return aItem && PCB_NETINFO_T == aItem->Type(); } wxString GetClass() const override