From 0963adb2f4a25c90fa4d601adba5618f8035d3c0 Mon Sep 17 00:00:00 2001 From: Aesylwinn Date: Mon, 8 Aug 2016 14:36:50 -0400 Subject: [PATCH] Fix pointer being deleted twice. --- apps/opencs/view/render/orbitcameramode.cpp | 4 ++-- apps/opencs/view/render/orbitcameramode.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/opencs/view/render/orbitcameramode.cpp b/apps/opencs/view/render/orbitcameramode.cpp index c7d980454..ba25beaba 100644 --- a/apps/opencs/view/render/orbitcameramode.cpp +++ b/apps/opencs/view/render/orbitcameramode.cpp @@ -15,9 +15,9 @@ namespace CSVRender , mWorldspaceWidget(worldspaceWidget) , mCenterOnSelection(0) { - mCenterShortcut.reset(new CSMPrefs::Shortcut("orbit-center-selection", worldspaceWidget)); + mCenterShortcut = new CSMPrefs::Shortcut("orbit-center-selection", worldspaceWidget); mCenterShortcut->enable(false); - connect(mCenterShortcut.get(), SIGNAL(activated()), this, SLOT(centerSelection())); + connect(mCenterShortcut, SIGNAL(activated()), this, SLOT(centerSelection())); } OrbitCameraMode::~OrbitCameraMode() diff --git a/apps/opencs/view/render/orbitcameramode.hpp b/apps/opencs/view/render/orbitcameramode.hpp index 4f72de957..312cd1756 100644 --- a/apps/opencs/view/render/orbitcameramode.hpp +++ b/apps/opencs/view/render/orbitcameramode.hpp @@ -32,7 +32,7 @@ namespace CSVRender WorldspaceWidget* mWorldspaceWidget; QAction* mCenterOnSelection; - std::auto_ptr mCenterShortcut; + CSMPrefs::Shortcut* mCenterShortcut; private slots: