Skip to content

Commit 5811248

Browse files
author
Alexander Krotov
authored
Merge pull request #289 from KAction/new-assert
python: assert that underlying dc_msg_t* for Message is not NULL
2 parents 0051720 + 47b76ce commit 5811248

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/src/deltachat/message.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, account, dc_msg):
2020
self._dc_context = account._dc_context
2121
assert isinstance(self._dc_context, ffi.CData)
2222
assert isinstance(dc_msg, ffi.CData)
23+
assert dc_msg != ffi.NULL
2324
self._dc_msg = dc_msg
2425
self.id = lib.dc_msg_get_id(dc_msg)
2526
assert self.id is not None and self.id >= 0, repr(self.id)

0 commit comments

Comments
 (0)