diff --git a/src/lib/arch/Arch.h b/src/lib/arch/Arch.h index bc624131..6417f968 100644 --- a/src/lib/arch/Arch.h +++ b/src/lib/arch/Arch.h @@ -120,6 +120,8 @@ public: */ static Arch* getInstance(); + static void setInstance(Arch* s) { s_instance = s; } + ARCH_PLUGIN& plugin() const { return (ARCH_PLUGIN&)m_plugin; } ARCH_INTERNET& internet() const { return (ARCH_INTERNET&)m_internet; } diff --git a/src/lib/plugin/ns/ns.cpp b/src/lib/plugin/ns/ns.cpp index 84e20b1e..c3bf1c33 100644 --- a/src/lib/plugin/ns/ns.cpp +++ b/src/lib/plugin/ns/ns.cpp @@ -39,7 +39,7 @@ init(void* log, void* arch) } if (g_arch == NULL) { - g_arch = new Arch(reinterpret_cast(arch)); + Arch::setInstance(reinterpret_cast(arch)); } }