From 011dbbe713a3faa07538c9c2130befdf7871e389 Mon Sep 17 00:00:00 2001 From: couriersud Date: Sat, 9 Jul 2016 00:13:18 +0200 Subject: Moved two macros, added more RAII and improved exceptions. Fixed some bugs in parser code. (nw) --- src/lib/netlist/plib/pstring.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/netlist/plib/pstring.cpp') diff --git a/src/lib/netlist/plib/pstring.cpp b/src/lib/netlist/plib/pstring.cpp index c85f18c260a..4db3de10503 100644 --- a/src/lib/netlist/plib/pstring.cpp +++ b/src/lib/netlist/plib/pstring.cpp @@ -25,7 +25,8 @@ pstr_t pstring_t::m_zero = pstr_t(0); template pstring_t::~pstring_t() { - sfree(m_ptr); + if (m_ptr != nullptr) + sfree(m_ptr); } template -- cgit v1.2.3-70-g09d2