From a3441a969d045858c0c92ad7d55ff91ab555ce65 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Sun, 22 Aug 2021 16:56:41 -0700 Subject: [PATCH] Return new string to avoid losing the reference NETCLASSes are stored as shared pointers. We lose the reference as soon as the pointer count decrements to 0, which can happen immediately when the shared pointer is returned. --- include/netclass.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/netclass.h b/include/netclass.h index d7501f0de3..8960688b57 100644 --- a/include/netclass.h +++ b/include/netclass.h @@ -62,7 +62,7 @@ public: return wxT( "NETCLASS" ); } - const wxString& GetName() const { return m_Name; } + const wxString GetName() const { return m_Name; } void SetName( const wxString& aName ) { m_Name = aName; } /**