From 87d3a48d682cbc1e163e6c5b45e5d99808e04b9c Mon Sep 17 00:00:00 2001 From: somewhatlurker <52014015+somewhatlurker@users.noreply.github.com> Date: Thu, 22 Aug 2019 06:25:52 +1000 Subject: [PATCH] launcher: fix crashing --- source-code/source/plugins/Launcher/PluginConfigApi.h | 1 + source-code/source/plugins/Launcher/framework.h | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source-code/source/plugins/Launcher/PluginConfigApi.h b/source-code/source/plugins/Launcher/PluginConfigApi.h index aeb69ec..89ec3a0 100644 --- a/source-code/source/plugins/Launcher/PluginConfigApi.h +++ b/source-code/source/plugins/Launcher/PluginConfigApi.h @@ -2,6 +2,7 @@ #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include +#include "framework.h" // resolution class to store and sort the width and height easily class resolution diff --git a/source-code/source/plugins/Launcher/framework.h b/source-code/source/plugins/Launcher/framework.h index 84bb05d..9e22d71 100644 --- a/source-code/source/plugins/Launcher/framework.h +++ b/source-code/source/plugins/Launcher/framework.h @@ -313,12 +313,13 @@ std::vector LoadPlugins() if (descFunc != NULL) thisplugin.description = descFunc(); else - thisplugin.description = (thisplugin.filename + L" plugin").c_str(); + thisplugin.description = (thisplugin.filename + L" Plugin").c_str(); if (optsFunc != NULL) thisplugin.configopts = optsFunc(); - FreeLibrary(thisplugin.handle); + // afaik FreeLibrary should be fine because of ref counting, but it isn't. whatever. + // FreeLibrary(thisplugin.handle); outvec.push_back(thisplugin); }