From 71e6149b3014ebd85fd98693b3b9027887995a8e Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 26 Apr 2024 13:48:20 +0200 Subject: [PATCH] Fix error handling if FindExport fails --- source/utils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/utils.cpp b/source/utils.cpp index 5ea40e3..263a1b6 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -105,27 +105,27 @@ NotificationModuleStatus NotificationModule_InitLibrary() { } if (OSDynLoad_FindExport(sModuleHandle, OS_DYNLOAD_EXPORT_FUNC, "NMAddDynamicNotification", (void **) &sNMAddDynamicNotification) != OS_DYNLOAD_OK) { DEBUG_FUNCTION_LINE_ERR("FindExport NMAddDynamicNotification failed."); - sNMAddStaticNotification = nullptr; + sNMAddDynamicNotification = nullptr; } if (OSDynLoad_FindExport(sModuleHandle, OS_DYNLOAD_EXPORT_FUNC, "NMUpdateDynamicNotificationText", (void **) &sNMUpdateDynamicNotificationText) != OS_DYNLOAD_OK) { DEBUG_FUNCTION_LINE_ERR("FindExport NMUpdateDynamicNotificationText failed."); - sNMAddStaticNotification = nullptr; + sNMUpdateDynamicNotificationText = nullptr; } if (OSDynLoad_FindExport(sModuleHandle, OS_DYNLOAD_EXPORT_FUNC, "NMUpdateDynamicNotificationBackgroundColor", (void **) &sNMUpdateDynamicNotificationBackgroundColor) != OS_DYNLOAD_OK) { DEBUG_FUNCTION_LINE_ERR("FindExport NMUpdateDynamicNotificationBackgroundColor failed."); - sNMAddStaticNotification = nullptr; + sNMUpdateDynamicNotificationBackgroundColor = nullptr; } if (OSDynLoad_FindExport(sModuleHandle, OS_DYNLOAD_EXPORT_FUNC, "NMUpdateDynamicNotificationTextColor", (void **) &sNMUpdateDynamicNotificationTextColor) != OS_DYNLOAD_OK) { DEBUG_FUNCTION_LINE_ERR("FindExport NMUpdateDynamicNotificationTextColor failed."); - sNMAddStaticNotification = nullptr; + sNMUpdateDynamicNotificationTextColor = nullptr; } if (OSDynLoad_FindExport(sModuleHandle, OS_DYNLOAD_EXPORT_FUNC, "NMFinishDynamicNotification", (void **) &sNMFinishDynamicNotification) != OS_DYNLOAD_OK) { DEBUG_FUNCTION_LINE_ERR("FindExport NMFinishDynamicNotification failed."); - sNMAddStaticNotification = nullptr; + sNMFinishDynamicNotification = nullptr; } sDefaultValues.clear();