Skip to content

Commit 26edee1

Browse files
committed
Spore ModAPI Launcher: check result of Injector.InjectDLL()
1 parent 4eb3832 commit 26edee1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Spore ModAPI Launcher/Program.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ void InjectSporeProcess(string dllEnding)
252252
}
253253

254254
IntPtr hDLLInjectorHandle = Injector.InjectDLL(this.ProcessInfo, modApiDllInjectorPath);
255+
if (hDLLInjectorHandle == IntPtr.Zero)
256+
{
257+
throw new Win32Exception("Failed to inject DLL: " + modApiDllInjectorPath);
258+
}
255259

256260
string[] dlls = GetDLLsToInject(dllEnding);
257261

0 commit comments

Comments
 (0)