Fem: replace raw pointer with WeakPtrT to check if the object has been deleted, fix crash in destructor of TaskFemConstraintOnBoundary
This commit is contained in:
@@ -25,9 +25,10 @@
|
||||
#ifndef GUI_TASKVIEW_TaskFemConstraint_H
|
||||
#define GUI_TASKVIEW_TaskFemConstraint_H
|
||||
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
#include <Gui/DocumentObserver.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
|
||||
#include "ViewProviderFemConstraint.h"
|
||||
|
||||
@@ -69,7 +70,7 @@ protected:
|
||||
protected:
|
||||
QWidget* proxy;
|
||||
QAction* deleteAction;
|
||||
ViewProviderFemConstraint *ConstraintView;
|
||||
Gui::WeakPtrT<ViewProviderFemConstraint> ConstraintView;
|
||||
enum {seldir, selref, selloc, selnone} selectionMode;
|
||||
|
||||
private:
|
||||
|
||||
@@ -39,7 +39,8 @@ TaskFemConstraintOnBoundary::TaskFemConstraintOnBoundary(ViewProviderFemConstrai
|
||||
|
||||
TaskFemConstraintOnBoundary::~TaskFemConstraintOnBoundary()
|
||||
{
|
||||
ConstraintView->highlightReferences(false);
|
||||
if (!ConstraintView.expired())
|
||||
ConstraintView->highlightReferences(false);
|
||||
}
|
||||
|
||||
void TaskFemConstraintOnBoundary::_addToSelection(bool checked)
|
||||
|
||||
Reference in New Issue
Block a user