summaryrefslogtreecommitdiff
path: root/src/msvc6/testrunner
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2001-05-20 08:43:04 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2001-05-20 08:43:04 +0000
commitef7b26956e5cec0e20220b4cebc8b58c1a9f7c64 (patch)
tree158ec4100eab3058bda4625dd7312e824ab4fc85 /src/msvc6/testrunner
parent88e86d062d01cd27d81c0bf8d4f54703d3d39de9 (diff)
downloadcppunit-ef7b26956e5cec0e20220b4cebc8b58c1a9f7c64.tar.gz
Access violation caused by NULL pointer in history list.
* Fixed bug #424320 (VC++ TestRunner): access violation caused by NULL pointer in history list. NULL pointer are not added to the history anymore.
Diffstat (limited to 'src/msvc6/testrunner')
-rw-r--r--src/msvc6/testrunner/TestRunnerModel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/msvc6/testrunner/TestRunnerModel.cpp b/src/msvc6/testrunner/TestRunnerModel.cpp
index e728de5..45a8d76 100644
--- a/src/msvc6/testrunner/TestRunnerModel.cpp
+++ b/src/msvc6/testrunner/TestRunnerModel.cpp
@@ -49,7 +49,9 @@ TestRunnerModel::selectHistoryTest( CppUnit::Test *test )
History::iterator end =
std::remove( m_history.begin(), m_history.end(), test );
m_history.erase( end, m_history.end() );
- m_history.push_front( test );
+
+ if ( test != NULL )
+ m_history.push_front( test );
}
@@ -83,7 +85,8 @@ TestRunnerModel::loadSettings()
break;
CppUnit::Test *test = findTestByName( testName );
- m_history.push_back( test );
+ if ( test != NULL )
+ m_history.push_back( test );
}
while ( true );
}