From 98b38615380c122f7baf8f91f1086a89c67df563 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Wed, 14 Nov 2012 19:17:09 +0100 Subject: [PATCH] Bug fix in TextException: gracefully handle exceptions with null text messages. --- src/base/TextException.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/TextException.cc b/src/base/TextException.cc index 555433b3ab..c18f2cc5c8 100644 --- a/src/base/TextException.cc +++ b/src/base/TextException.cc @@ -17,7 +17,7 @@ TextException::TextException(const TextException& right) : } TextException::TextException(const char *aMsg, const char *aFileName, int aLineNo, unsigned int anId): - message(xstrdup(aMsg)), theFileName(aFileName), theLineNo(aLineNo), theId(anId) + message(aMsg?xstrdup(aMsg):NULL), theFileName(aFileName), theLineNo(aLineNo), theId(anId) {} TextException::~TextException() throw() -- 2.47.3