talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 7154ef9813b0a69edc4a2c7771fc78091a782e4f
parent 710fd469103d9f7743eb2ae9fb454c368e95b9e8
Author: Holger Berndt <hb@claws-mail.org>
Date:   Thu,  8 Aug 2013 23:26:22 +0200

Python plugin: Account: Harden string representation
Diffstat:
Msrc/plugins/python/accounttype.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/python/accounttype.c b/src/plugins/python/accounttype.c @@ -53,7 +53,9 @@ static int Account_compare(clawsmail_AccountObject *obj1, clawsmail_AccountObjec static PyObject* Account_str(clawsmail_AccountObject *self) { - return PyString_FromFormat("Account: %s", self->account->account_name); + if(self->account && self->account->account_name) + return PyString_FromFormat("Account: %s", self->account->account_name); + Py_RETURN_NONE; } static PyObject* get_account_name(clawsmail_AccountObject *self, void *closure)