My QDialog class is Net2Detect and is called from MainWin::versionModeSwitch()

MS Visual Studio Call Stack:
Qt Code:
  1. QtGuid4.dll!QTableModel::clearContents() Line 753 + 0x2a bytes
  2. QtGuid4.dll!QTableModel::clear() Line 746
  3. QtGuid4.dll!QTableModel::~QTableModel() Line 40
  4. QtGuid4.dll!QTableModel::'scaler deleting destructor'() + 0xf bytes
  5. QtCored4.dll!QObjectPrivate::deleteChildren() Line 1910 + 0x24 bytes
  6. QtGuid4.dll!QWidget::~QWidget() Line 1184
  7. QtGuid4.dll!QFrame::~QFrame() Line 227 + 0x8 bytes
  8. QtGuid4.dll!QAbstractScrollArea::~QAbstractScrollArea() Line 452 + 0xf bytes
  9. QtGuid4.dll!QAbstractItemView::~QAbstractItemView() Line 466 + 0x8 bytes
  10. QtGuid4.dll!QTableView::~QTableView() Line 481 + 0x8 bytes
  11. QtGuid4.dll!QTableWidget::~QTableWidget() Line 1849 + 0x8 bytes
  12. GCE.exe!Net2Detect::~Net2Detect() + 0x48 bytes
  13. GCE.exe!MainWin::versionModeSwitch() Line2386 0xf bytes
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void QTableModel::clearContents()
  2. {
  3. for (int i = 0; i < tableItems.count(); ++i) {
  4. if (tableItems.at(i)) {
  5. tableItems.at(i)->view = 0;
  6. delete tableItems.at(i); // <-- crashes here
  7. tableItems[i] = 0;
  8. }
  9. }
  10. reset();
  11. }
To copy to clipboard, switch view to plain text mode