Skip to content

Commit 6ad210a

Browse files
cursoragentipetrov
andcommitted
Fix: Return false if GetManagedObject returns null
Co-authored-by: ipetrov <[email protected]>
1 parent b00a2e8 commit 6ad210a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DSPythonNet3/Encoders/ListEncodeDecoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ private static bool TryGetClrObject(PyObject pyObj, out object clrObject)
9898
try
9999
{
100100
clrObject = pyObj.GetManagedObject();
101-
return true;
101+
return clrObject != null;
102102
}
103103
catch
104104
{

0 commit comments

Comments
 (0)