Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Prevent exception override
  • Loading branch information
amos402 committed Dec 14, 2019
commit 5150e618612a299af3a5c970f5ec299b3ca974f0
10 changes: 8 additions & 2 deletions src/runtime/runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,14 @@ private static IntPtr Get_PyObject_NextNotImplemented()
IntPtr res = PyRun_String(code, (IntPtr)RunFlagType.File, globals, globals);
if (res == IntPtr.Zero)
{
XDecref(globals);
throw new PythonException();
try
{
throw new PythonException();
}
finally
{
XDecref(globals);
}
}
XDecref(res);
IntPtr A = PyDict_GetItemString(globals, "A");
Expand Down