From 0e6936a7ee41a48c0abd9e5eb52071536b6999a4 Mon Sep 17 00:00:00 2001 From: BotoX Date: Wed, 25 Sep 2019 18:57:27 +0200 Subject: [PATCH] Revert "Fix crash" This reverts commit 67b3b54ae1595db6c8f270dec1c1e6702d3fe9d5. --- vhook.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vhook.cpp b/vhook.cpp index c245a66..acdb4fc 100644 --- a/vhook.cpp +++ b/vhook.cpp @@ -440,6 +440,7 @@ void *Callback(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; ret = CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_ChangedOverride: if(dg->returnType != ReturnType_Void) @@ -467,6 +468,7 @@ void *Callback(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_Override: if(dg->returnType != ReturnType_Void) @@ -520,6 +522,7 @@ void *Callback(DHooksCallback *dg, void **argStack) g_SHPtr->DoRecall(); g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; + g_SHPtr->EndContext(NULL); } break; default: @@ -621,6 +624,7 @@ float Callback_float(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; *(float *)ret = CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_ChangedOverride: if(dg->returnType != ReturnType_Void) @@ -641,6 +645,7 @@ float Callback_float(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_Override: if(dg->returnType != ReturnType_Void) @@ -778,6 +783,7 @@ SDKVector *Callback_vector(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; *vec_result = CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_ChangedOverride: if(dg->returnType != ReturnType_Void) @@ -798,6 +804,7 @@ SDKVector *Callback_vector(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_Override: if(dg->returnType != ReturnType_Void) @@ -926,6 +933,7 @@ string_t *Callback_stringt(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; *string_result = CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_ChangedOverride: if(dg->returnType != ReturnType_Void) @@ -946,6 +954,7 @@ string_t *Callback_stringt(DHooksCallback *dg, void **argStack) g_SHPtr->SetRes(MRES_SUPERCEDE); mres = MRES_SUPERCEDE; CallVFunction(dg, paramStruct, g_SHPtr->GetIfacePtr()); + g_SHPtr->EndContext(NULL); break; case MRES_Override: if(dg->returnType != ReturnType_Void)