From 035031d902224a50a17e6bb457ba80543a13cbb2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 19 Nov 2022 11:16:47 +0100 Subject: [PATCH] BOARD_CONNECTED_ITEM::GetShortNetname(): protect against nullptr. m_netinfo was not tested against nullptr in this method, although it is tested in all other places. --- pcbnew/board_connected_item.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/board_connected_item.cpp b/pcbnew/board_connected_item.cpp index c365434cde..7c20248742 100644 --- a/pcbnew/board_connected_item.cpp +++ b/pcbnew/board_connected_item.cpp @@ -133,7 +133,7 @@ wxString BOARD_CONNECTED_ITEM::GetNetnameMsg() const wxString BOARD_CONNECTED_ITEM::GetShortNetname() const { - return m_netinfo->GetShortNetname(); + return m_netinfo ? m_netinfo->GetShortNetname() : wxString(); }