Commit f8498ce4 authored by Tracie Sucharski's avatar Tracie Sucharski
Browse files

Fixed seg fault wehn closing the ControlPointEditView which was caused by...

Fixed seg fault wehn closing the ControlPointEditView which was caused by deleting a null QPointer in Directory::cleanupControlPointEditViewWidget.  Fixes #4959.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7850 41f8697f-d340-4b68-9986-7bafba869bb8
parent 3aec22df
Loading
Loading
Loading
Loading
+6 −15
Original line number Diff line number Diff line
@@ -926,15 +926,12 @@ namespace Isis {
   * @brief Reomoves pointers to deleted ImageFileListWidget objects.
   */
  void Directory::cleanupFileListWidgets(QObject *obj) {
//  qDebug()<<"Directory::cleanupFileListWidgets  obj = "<<obj;

    ImageFileListWidget *imageFileListWidget = static_cast<ImageFileListWidget *>(obj);
//  qDebug()<<"                                          cast fileListWidget = "<<fileListWidget<<"  # = "<<m_fileListWidgets.count();
    if (!imageFileListWidget) {
      return;
    }
//  qDebug()<<"Directory::cleanupFileListWidgets before remove # = "<<m_fileListWidgets.count();
    m_fileListWidgets.removeAll(imageFileListWidget);
//  qDebug()<<"Directory::cleanupFileListWidgets  # = "<<m_fileListWidgets.count();
  }


@@ -942,15 +939,12 @@ namespace Isis {
   * @brief Removes pointers to deleted Footprint2DView objects.
   */
  void Directory::cleanupFootprint2DViewWidgets(QObject *obj) {
//  qDebug()<<"Directory::cleanupFootprint2DViewWidgets  obj = "<<obj;

    Footprint2DView *footprintView = static_cast<Footprint2DView *>(obj);
//  qDebug()<<"                                          cast footprintView = "<<footprintView<<"  # = "<<m_footprint2DViewWidgets.count();
    if (!footprintView) {
      return;
    }
//  qDebug()<<"Directory::cleanupFootprint2DViewWidgets before remove # = "<<m_footprint2DViewWidgets.count();
    m_footprint2DViewWidgets.removeAll(footprintView);
//  qDebug()<<"Directory::cleanupFootprint2DViewWidgets  # = "<<m_footprint2DViewWidgets.count();
  }


@@ -967,9 +961,6 @@ namespace Isis {
    //  of ControlPointEditView
//    delete m_chipViewports;
//    qDebug()<<"Directory::cleanupControlPointEditViewWidget  m_controlPointEditViewWidget = "<<m_controlPointEditViewWidget;
//    if (m_controlPointEditViewWidget) {
//      delete m_controlPointEditViewWidget;
//    }
  }


+10 −5
Original line number Diff line number Diff line
@@ -136,7 +136,12 @@ namespace Isis {
   *                           the correct view/widget from the lists.  Fixes #4847.
   *   @history 2017-06-14 Ken Edmundson - Commented out ChipViewport widget code.  This will be
   *                           temporary until the widget is fully developed.

   *   @history 2017-07-10 Tracie Sucharski - Removed deletion of m_controlPointEditViewWidget.
   *                           Because it is a QPointer, it is set to null when ControlPointEditView
   *                           is destroyed.  Currently, cleanupControlPointEditViewWidget is not
   *                           doing anything.  However, I'm leaving the method for now, because
   *                           once the views are connected, we will probably need to cleanup the
   *                           connections when the view is closed.  Fixes #4959.
   */
  class Directory : public QObject {
    Q_OBJECT