summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pstring.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-07-09 00:13:18 +0200
committer couriersud <couriersud@arcor.de>2016-07-09 00:13:18 +0200
commit011dbbe713a3faa07538c9c2130befdf7871e389 (patch)
tree4dd7150d527d6b6d6c2c7dd42e4b449953c305ec /src/lib/netlist/plib/pstring.cpp
parent3f58aa4548327df4a6223ed7bf84e614c2cb12e7 (diff)
Moved two macros, added more RAII and improved exceptions. Fixed some
bugs in parser code. (nw)
Diffstat (limited to 'src/lib/netlist/plib/pstring.cpp')
-rw-r--r--src/lib/netlist/plib/pstring.cpp3
1 files changed, 2 insertions, 1 deletions
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<pu8_traits>::m_zero = pstr_t(0);
template<typename F>
pstring_t<F>::~pstring_t()
{
- sfree(m_ptr);
+ if (m_ptr != nullptr)
+ sfree(m_ptr);
}
template<typename F>