From f5398ee2e068c90abe4a4bac79b554b65b4aea6a Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 3 May 2020 11:17:29 +0200 Subject: [PATCH] Only call __init_wut_stdcpp when it exists --- include/wups/hooks.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/wups/hooks.h b/include/wups/hooks.h index 27dd97e..d8f7558 100644 --- a/include/wups/hooks.h +++ b/include/wups/hooks.h @@ -202,7 +202,9 @@ typedef struct wups_loader_app_started_args_t { #define WUPS_USE_WUT_STDCPP() \ extern "C" void __init_wut_stdcpp() __attribute__((weak)); \ void on_init_wut_stdcpp(){ \ + if (__init_wut_stdcpp) { \ __init_wut_stdcpp(); \ + } \ }\ WUPS_HOOK_EX(WUPS_LOADER_HOOK_INIT_WUT_STDCPP,on_init_wut_stdcpp); \ extern "C" void __fini_wut_stdcpp() __attribute__((weak)); \