diff --git a/python/src/deltachat/cutil.py b/python/src/deltachat/cutil.py index 2b9aa7a0f..b230276b9 100644 --- a/python/src/deltachat/cutil.py +++ b/python/src/deltachat/cutil.py @@ -17,7 +17,8 @@ def iter_array(dc_array_t, constructor): def from_dc_charpointer(obj): - return ffi.string(ffi.gc(obj, lib.dc_str_unref)).decode("utf8") + if obj != ffi.NULL: + return ffi.string(ffi.gc(obj, lib.dc_str_unref)).decode("utf8") class DCLot: