From 934b492357714bd17d4cdea5061471119f14e997 Mon Sep 17 00:00:00 2001 From: mjk Date: Mon, 22 Mar 2021 13:43:13 +0000 Subject: [PATCH] init `Callback` completely always The `token` pointer was left dangerously uninitialized after construction. --- .../api/src/gobject/winrt-toast-notification.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp b/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp index e7663e09..822484f8 100644 --- a/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp +++ b/plugins/windows-notification/api/src/gobject/winrt-toast-notification.cpp @@ -30,11 +30,11 @@ public: Callback(T callback, void* context, void(*free)(void*)) - { - this->callback = callback; - this->free = free; - this->context = context; - } + : token {} + , callback{callback} + , context {context} + , free {free} + {} ~Callback() {