Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion nvse/nvse/Hooks_Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,10 +1120,15 @@ void __fastcall PostScriptCompileSuccess(Script* script, ScriptBuffer* scriptBuf
// - If Script->Compile is called in the GECK outside of the vanilla code this will NOT be hit
// - Not sure if this is a problem, maybe all plugins should be compiling scripts via NVSE and we can clean up the runtime hooks as well?
static char __fastcall CompileScriptHook(void* context, void* edx, Script* script, ScriptBuffer *buf) {
if (buf == nullptr || buf->scriptText == nullptr) {
if (buf == nullptr) {
return 1;
}

if (buf->scriptText == nullptr) {
// Let original compiler take over for empty script text (i.e. cleanup after removing a partial script)
return ThisStdCall<char>(0x5C96E0, context, script, buf);
}

auto precompileResult = HandleBeginCompile(buf, script);
char result = 0;

Expand Down
Loading