Skip to content
Merged
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
Increase ref-count as documented for PyErr_Restore
  • Loading branch information
filmor committed Nov 14, 2018
commit d80a8b93129e9d732b89959af85467623f537492
3 changes: 3 additions & 0 deletions src/runtime/exceptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ public static void SetError(Exception e)
var pe = e as PythonException;
if (pe != null)
{
Runtime.XIncref(pe.PyType);
Runtime.XIncref(pe.PyValue);
Runtime.XIncref(pe.PyTB);
Runtime.PyErr_Restore(pe.PyType, pe.PyValue, pe.PyTB);
return;
}
Expand Down