From 467ebabf29c13a6f20ea5f7a1ec6d59c615e453c Mon Sep 17 00:00:00 2001
From: Mataes <mataes2007@gmail.com>
Date: Sat, 11 Apr 2020 15:47:21 +0300
Subject: Newstory: Unload 1st part, crash not fixed

---
 plugins/NewStory/src/main.cpp | 8 ++++++++
 plugins/NewStory/src/stdafx.h | 1 +
 2 files changed, 9 insertions(+)

(limited to 'plugins/NewStory')

diff --git a/plugins/NewStory/src/main.cpp b/plugins/NewStory/src/main.cpp
index b5fb6a8591..085a613fb0 100644
--- a/plugins/NewStory/src/main.cpp
+++ b/plugins/NewStory/src/main.cpp
@@ -105,3 +105,11 @@ int CMPlugin::Load()
 	HookEvent(ME_SYSTEM_MODULESLOADED, evtModulesLoaded);
 	return 0;
 }
+
+int CMPlugin::Unload()
+{
+	UnregisterClass(_T(NEWSTORYLIST_CLASS), g_plugin.getInst());
+	DestroyFonts();
+
+	return 0;
+}
\ No newline at end of file
diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h
index fc67c04f43..b58cadab99 100644
--- a/plugins/NewStory/src/stdafx.h
+++ b/plugins/NewStory/src/stdafx.h
@@ -76,5 +76,6 @@ struct CMPlugin : public PLUGIN<CMPlugin>
 	CMPlugin();
 
 	int Load() override;
+	int Unload() override;
 };
 
-- 
cgit v1.2.3