From e275bfdfc15acb1e6b36beb4d39b03ea79900dae Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Fri, 23 Nov 2012 19:11:52 -0700 Subject: [PATCH] Fix 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.2