diff --git a/sourcepawn/jit/engine2.cpp b/sourcepawn/jit/engine2.cpp index 25957f05..43aeff68 100644 --- a/sourcepawn/jit/engine2.cpp +++ b/sourcepawn/jit/engine2.cpp @@ -125,7 +125,10 @@ IPluginRuntime *SourcePawnEngine2::LoadPlugin(ICompilation *co, const char *file return_error: *err = error; - fclose(fp); + if (fp != NULL) + { + fclose(fp); + } return NULL; }