From 0de6d5a7546fcba4c2694bc8acca8ff81e406302 Mon Sep 17 00:00:00 2001 From: Andrei Andreev Date: Thu, 3 Mar 2022 11:45:09 +0100 Subject: [PATCH] Add null check to confirm_clicked_callback --- .../tribler_gui/dialogs/addtopersonalchanneldialog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tribler-gui/tribler_gui/dialogs/addtopersonalchanneldialog.py b/src/tribler-gui/tribler_gui/dialogs/addtopersonalchanneldialog.py index ab09f77983a..554d1435854 100644 --- a/src/tribler-gui/tribler_gui/dialogs/addtopersonalchanneldialog.py +++ b/src/tribler-gui/tribler_gui/dialogs/addtopersonalchanneldialog.py @@ -120,7 +120,8 @@ def on_confirm_clicked(self, checked): channel_id = self.get_selected_channel_id() if channel_id is None: return - self.confirm_clicked_callback(channel_id) + if self.confirm_clicked_callback: + self.confirm_clicked_callback(channel_id) self.close_dialog() def on_channel_contents(self, response, channel_id):