Merge pull request #1012 from Aesylwinn/FixPointerDeletion

Fix pointer being deleted twice.
coverity_scan^2
scrawl 9 years ago committed by GitHub
commit d7845012bf

@ -15,9 +15,9 @@ namespace CSVRender
, mWorldspaceWidget(worldspaceWidget) , mWorldspaceWidget(worldspaceWidget)
, mCenterOnSelection(0) , mCenterOnSelection(0)
{ {
mCenterShortcut.reset(new CSMPrefs::Shortcut("orbit-center-selection", worldspaceWidget)); mCenterShortcut = new CSMPrefs::Shortcut("orbit-center-selection", worldspaceWidget);
mCenterShortcut->enable(false); mCenterShortcut->enable(false);
connect(mCenterShortcut.get(), SIGNAL(activated()), this, SLOT(centerSelection())); connect(mCenterShortcut, SIGNAL(activated()), this, SLOT(centerSelection()));
} }
OrbitCameraMode::~OrbitCameraMode() OrbitCameraMode::~OrbitCameraMode()

@ -32,7 +32,7 @@ namespace CSVRender
WorldspaceWidget* mWorldspaceWidget; WorldspaceWidget* mWorldspaceWidget;
QAction* mCenterOnSelection; QAction* mCenterOnSelection;
std::auto_ptr<CSMPrefs::Shortcut> mCenterShortcut; CSMPrefs::Shortcut* mCenterShortcut;
private slots: private slots:

Loading…
Cancel
Save