From 8ef53aa3637b57355ef6a8d8afb679d28de71d3f Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 28 Sep 2020 12:18:39 +0200 Subject: [PATCH] Remove unnecessary condition According to the python documentation, `Py_CLEAR()` has no effect when the argument is `NULL`, see https://docs.python.org/3/c-api/refcounting.html#c.Py_CLEAR. --- kitty/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/cocoa_window.m b/kitty/cocoa_window.m index 0af66d93b..04f57491a 100644 --- a/kitty/cocoa_window.m +++ b/kitty/cocoa_window.m @@ -536,7 +536,7 @@ cleanup() { if (dockMenu) [dockMenu release]; dockMenu = nil; - if (notification_activated_callback) Py_CLEAR(notification_activated_callback); + Py_CLEAR(notification_activated_callback); drain_pending_notifications(NO); free(notification_queue.notifications); notification_queue.notifications = NULL;