From 18bc9100c2cae5abbe41a334cae329acb868f4c3 Mon Sep 17 00:00:00 2001 From: neru Date: Fri, 19 Jun 2026 03:40:06 -0300 Subject: [PATCH] fix: nullptr initialization --- src/unlocker/cache-cleaner.h | 2 +- src/unlocker/main.cpp | 6 +++--- src/unlocker/proxy-configurator.h | 7 +++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/unlocker/cache-cleaner.h b/src/unlocker/cache-cleaner.h index bc70c83..ab0b445 100644 --- a/src/unlocker/cache-cleaner.h +++ b/src/unlocker/cache-cleaner.h @@ -24,5 +24,5 @@ class CacheCleaner std::unique_ptr _monitorThread; std::string _cacheDir; - seallib::Logger* _log; + seallib::Logger* _log = nullptr; }; diff --git a/src/unlocker/main.cpp b/src/unlocker/main.cpp index 31a3864..9794ed7 100644 --- a/src/unlocker/main.cpp +++ b/src/unlocker/main.cpp @@ -18,9 +18,9 @@ #define CREATE_NO_WINDOW 0x08000000 bool running = true; -TinyMITMProxy* proxy; -ProxyConfigurator* conf; -CacheCleaner* cleaner ; +TinyMITMProxy* proxy = nullptr; +ProxyConfigurator* conf = nullptr; +CacheCleaner* cleaner = nullptr; BOOL WINAPI consoleHandler(DWORD dwType) { diff --git a/src/unlocker/proxy-configurator.h b/src/unlocker/proxy-configurator.h index 8bf430d..c4187af 100644 --- a/src/unlocker/proxy-configurator.h +++ b/src/unlocker/proxy-configurator.h @@ -1,6 +1,9 @@ #pragma once -#include +namespace seallib +{ + class Logger; +} class ProxyConfigurator { @@ -12,5 +15,5 @@ class ProxyConfigurator bool clearProxy(); private: - seallib::Logger* _log; + seallib::Logger* _log = nullptr; };