Fixed Segfault caused by uninitialized ModelTester pointers in Release mode (Fixes issue 5)

This commit is contained in:
Srivats P. 2010-05-16 11:46:41 +05:30
parent 46cebefb19
commit ed13bba83b
2 changed files with 8 additions and 3 deletions

View File

@ -29,8 +29,11 @@ PortGroupList::PortGroupList()
{
PortGroup *pg;
#ifndef QT_NO_DEBUG
// TODO(LOW): Remove
#ifdef QT_NO_DEBUG
streamModelTester_ = NULL;
portModelTester_ = NULL;
portStatsModelTester_ = NULL;
#else
streamModelTester_ = new ModelTest(getStreamModel());
portModelTester_ = new ModelTest(getPortModel());
portStatsModelTester_ = new ModelTest(getPortStatsModel());

View File

@ -136,7 +136,9 @@ StreamConfigDialog::StreamConfigDialog(Port &port, uint streamIndex,
LoadCurrentStream();
mpPacketModel = new PacketModel(this);
tvPacketTree->setModel(mpPacketModel);
#ifndef QT_NO_DEBUG
#ifdef QT_NO_DEBUG
mpPacketModelTester = NULL;
#else
mpPacketModelTester = new ModelTest(mpPacketModel);
#endif
tvPacketTree->header()->hide();