summaryrefslogtreecommitdiffhomepage
path: root/opentrack/work.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/work.hpp')
-rw-r--r--opentrack/work.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/opentrack/work.hpp b/opentrack/work.hpp
index 5d1f6b54..e338e9f4 100644
--- a/opentrack/work.hpp
+++ b/opentrack/work.hpp
@@ -28,7 +28,7 @@ struct Work
Work(main_settings& s, Mappings& m, SelectedLibraries& libs, QObject* recv, WId handle) :
s(s), libs(libs),
tracker(std::make_shared<Tracker>(s, m, libs)),
- sc(std::make_shared<Shortcuts>(handle)),
+ sc(std::make_shared<Shortcuts>()),
handle(handle)
{
#ifndef _WIN32
@@ -50,6 +50,7 @@ struct Work
~Work()
{
+ sc = nullptr;
// order matters, otherwise use-after-free -sh
tracker = nullptr;
libs = SelectedLibraries();