We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a49f6e0 commit 4eb3832Copy full SHA for 4eb3832
Spore ModAPI Launcher/Program.cs
@@ -245,8 +245,13 @@ void InjectSporeProcess(string dllEnding)
245
246
try
247
{
248
- const string modApiDllInjector = "ModAPI.DLLInjector.dll";
249
- IntPtr hDLLInjectorHandle = Injector.InjectDLL(this.ProcessInfo, Path.Combine(this.LauncherKitPath, modApiDllInjector));
+ string modApiDllInjectorPath = Path.Combine(this.LauncherKitPath, "ModAPI.DLLInjector.dll");
+ if (!File.Exists(modApiDllInjectorPath))
250
+ {
251
+ throw new FileNotFoundException("Required injector DLL was not found: " + modApiDllInjectorPath);
252
+ }
253
+
254
+ IntPtr hDLLInjectorHandle = Injector.InjectDLL(this.ProcessInfo, modApiDllInjectorPath);
255
256
string[] dlls = GetDLLsToInject(dllEnding);
257
0 commit comments