summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/toast_event_handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src/toast_event_handler.cpp')
-rw-r--r--plugins/Toaster/src/toast_event_handler.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/Toaster/src/toast_event_handler.cpp b/plugins/Toaster/src/toast_event_handler.cpp
index 305ca120f7..31c3a97eef 100644
--- a/plugins/Toaster/src/toast_event_handler.cpp
+++ b/plugins/Toaster/src/toast_event_handler.cpp
@@ -46,12 +46,8 @@ IFACEMETHODIMP ToastEventHandler::QueryInterface(_In_ REFIID riid, _COM_Outptr_
*ppv = (DesktopToastFailedEventHandler*)(this);
else *ppv = nullptr;
- if (*ppv) {
- ((IUnknown*)*ppv)->AddRef();
- return S_OK;
- }
-
- return E_NOINTERFACE;
+ if (*ppv) ((IUnknown*)*ppv)->AddRef();
+ return (*ppv ? S_OK : E_NOINTERFACE);
}
IFACEMETHODIMP ToastEventHandler::Invoke(_In_ IToastNotification * /*sender*/, _In_ IInspectable* /*args*/)