summaryrefslogtreecommitdiff
path: root/src/util/Assert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/Assert.cpp')
-rw-r--r--src/util/Assert.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/util/Assert.cpp b/src/util/Assert.cpp
index 06be4ab7c..1611f28d3 100644
--- a/src/util/Assert.cpp
+++ b/src/util/Assert.cpp
@@ -70,8 +70,10 @@ void AssertionException::construct(const char* header, const char* extra,
setMessage(string(buf));
#ifdef CVC4_DEBUG
- // we leak buf[] but only in debug mode with assertions failing
- s_debugAssertionFailure = buf;
+ if(s_debugAssertionFailure == NULL) {
+ // we leak buf[] but only in debug mode with assertions failing
+ s_debugAssertionFailure = buf;
+ }
#else /* CVC4_DEBUG */
delete [] buf;
#endif /* CVC4_DEBUG */
@@ -110,7 +112,9 @@ void AssertionException::construct(const char* header, const char* extra,
#ifdef CVC4_DEBUG
// we leak buf[] but only in debug mode with assertions failing
- s_debugAssertionFailure = buf;
+ if(s_debugAssertionFailure == NULL) {
+ s_debugAssertionFailure = buf;
+ }
#else /* CVC4_DEBUG */
delete [] buf;
#endif /* CVC4_DEBUG */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback