mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-23 03:18:08 +01:00
Fixing the crashes that I was seeing
--HG-- extra : transplant_source : %3E%B1%BB%DF%3C%22%A6%CC%90Z%E8v%95%962%DD%B2%A1%11%CC
This commit is contained in:
parent
92d3c24bc8
commit
c54b2683cd
1 changed files with 2 additions and 4 deletions
|
@ -246,8 +246,7 @@ class Tags(object):
|
||||||
def next(self):
|
def next(self):
|
||||||
nmlib.notmuch_tags_move_to_next(self._tags)
|
nmlib.notmuch_tags_move_to_next(self._tags)
|
||||||
if not nmlib.notmuch_tags_valid(self._tags):
|
if not nmlib.notmuch_tags_valid(self._tags):
|
||||||
print("Freeing the Tags now")
|
self._tags = None
|
||||||
nmlib.notmuch_tags_destroy (self._tags)
|
|
||||||
raise StopIteration
|
raise StopIteration
|
||||||
return Tags._get (self._tags)
|
return Tags._get (self._tags)
|
||||||
|
|
||||||
|
@ -299,8 +298,6 @@ class Messages(object):
|
||||||
|
|
||||||
nmlib.notmuch_messages_move_to_next(self._msgs)
|
nmlib.notmuch_messages_move_to_next(self._msgs)
|
||||||
if not nmlib.notmuch_messages_valid(self._msgs):
|
if not nmlib.notmuch_messages_valid(self._msgs):
|
||||||
print("Freeing the Messages now")
|
|
||||||
nmlib.notmuch_messages_destroy (self._msgs)
|
|
||||||
self._msgs = None
|
self._msgs = None
|
||||||
raise StopIteration
|
raise StopIteration
|
||||||
return Message(Messages._get (self._msgs), self)
|
return Message(Messages._get (self._msgs), self)
|
||||||
|
@ -339,6 +336,7 @@ class Message(object):
|
||||||
if msg_p is None:
|
if msg_p is None:
|
||||||
NotmuchError(STATUS.NULL_POINTER)
|
NotmuchError(STATUS.NULL_POINTER)
|
||||||
self._msg = msg_p
|
self._msg = msg_p
|
||||||
|
#keep reference to parent, so we keep it alive
|
||||||
self._parent = parent
|
self._parent = parent
|
||||||
print "Inited Message derived from %s" %(str(parent))
|
print "Inited Message derived from %s" %(str(parent))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue