Add missing assertion to QAbstractTestLogger.

If passed an empty string, QAbstractTestLogger::outputString() would
crash, so add a QTEST_ASSERT to make the cause of any crashes more
obvious.

Change-Id: I00afe2e73120b87e211f858402d441f345dddd08
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-12-12 17:32:48 +10:00 committed by Qt by Nokia
parent 9f592dbd60
commit d702da7482

View File

@ -93,6 +93,7 @@ void QAbstractTestLogger::filterUnprintable(char *str) const
void QAbstractTestLogger::outputString(const char *msg)
{
QTEST_ASSERT(stream);
QTEST_ASSERT(msg);
char *filtered = new char[strlen(msg) + 1];
strcpy(filtered, msg);