From 69955a0aa9fc62b25ef1f0dfd545c371852915f7 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sun, 1 May 2016 12:48:44 +1000 Subject: [PATCH] [Settings] check g_PluginSettings.RegisterSetting is not null in RegisterSetting --- Source/Settings/Settings.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Settings/Settings.cpp b/Source/Settings/Settings.cpp index 33324d9f1..feb7509ec 100644 --- a/Source/Settings/Settings.cpp +++ b/Source/Settings/Settings.cpp @@ -104,6 +104,10 @@ void SetModuleName(const char * Name) void RegisterSetting(short SettingID, SETTING_DATA_TYPE Type, const char * Name, const char * Category, unsigned int DefaultDW, const char * DefaultStr) { + if (g_PluginSettings.RegisterSetting == NULL) + { + return; + } int DefaultID = g_PluginSettings.NoDefault; SettingLocation Location = (SettingLocation)g_PluginSettings.DefaultLocation; char FullCategory[400];