mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 13:20:59 +00:00
[Build] Fixed ErrorHelper local variable
We need to emit a ldloca instruction before constructing the ErrorHelper instance, in order to reference it in the finally block below.
This commit is contained in:
parent
2f3e7a9493
commit
18ef634610
|
@ -363,9 +363,9 @@ namespace OpenTK.Rewrite
|
|||
|
||||
vars.ErrorHelperLocal = new VariableDefinition(vars.ErrorHelperType);
|
||||
|
||||
// var helper = new ErrorHelper(GraphicsContext.CurrentContext);
|
||||
// using (new ErrorHelper(GraphicsContext.CurrentContext)) { ...
|
||||
il.Body.Variables.Add(vars.ErrorHelperLocal);
|
||||
//il.Emit(OpCodes.Ldarga, vars.ErrorHelperLocal); // todo: fix this
|
||||
il.Emit(OpCodes.Ldloca, vars.ErrorHelperLocal);
|
||||
il.Emit(OpCodes.Call, vars.Get_CurrentContext);
|
||||
il.Emit(OpCodes.Call, ctor);
|
||||
|
||||
|
|
Loading…
Reference in a new issue