projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
710fd46
)
Python plugin: Account: Harden string representation
author
Holger Berndt
<hb@claws-mail.org>
Thu, 8 Aug 2013 21:26:22 +0000
(23:26 +0200)
committer
Holger Berndt
<hb@claws-mail.org>
Thu, 8 Aug 2013 21:34:37 +0000
(23:34 +0200)
src/plugins/python/accounttype.c
patch
|
blob
|
history
diff --git
a/src/plugins/python/accounttype.c
b/src/plugins/python/accounttype.c
index d50f2528f3490a17ab807b9cbe81a1391bc757a1..6239eadbaeaa0f4a7efabfac474bbf1156ea1ae8 100644
(file)
--- 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)
{
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)
}
static PyObject* get_account_name(clawsmail_AccountObject *self, void *closure)