From 16fe286ed97e89a6768e0eb1e983ab55cc396eaf Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 23 Mar 2019 01:45:29 +0100 Subject: Use weak-pointer for Controllable learning --- libs/widgets/binding_proxy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/widgets') diff --git a/libs/widgets/binding_proxy.cc b/libs/widgets/binding_proxy.cc index 85119ab1c0..98f4443ad2 100644 --- a/libs/widgets/binding_proxy.cc +++ b/libs/widgets/binding_proxy.cc @@ -91,7 +91,7 @@ bool BindingProxy::button_press_handler (GdkEventButton *ev) { if ( controllable && is_bind_action(ev) ) { - if (Controllable::StartLearning (controllable.get())) { + if (Controllable::StartLearning (controllable)) { string prompt = _("operate controller now"); if (prompter == 0) { prompter = new PopUp (Gtk::WIN_POS_MOUSE, 30000, false); @@ -121,7 +121,7 @@ BindingProxy::prompter_hiding (GdkEventAny* /*ev*/) { learning_connection.disconnect (); if (controllable) { - Controllable::StopLearning (controllable.get()); + Controllable::StopLearning (controllable); } return false; } -- cgit v1.2.3