Mercurial > pidgin
comparison src/protocols/msn/msg.c @ 12250:5e2a365af01b
[gaim-migrate @ 14552]
Change some *_unref() reference count guards into g_return_if_fail()/g_return_val_if_fail(). That way we'll get a debug message if they fail, not that they ever should, of course.
committer: Tailor Script <tailor@pidgin.im>
| author | Richard Laager <rlaager@wiktel.com> |
|---|---|
| date | Mon, 28 Nov 2005 11:47:50 +0000 |
| parents | 162dd2f8ad92 |
| children | bc30c6270d9f |
comparison
equal
deleted
inserted
replaced
| 12249:064a2c28ceec | 12250:5e2a365af01b |
|---|---|
| 94 | 94 |
| 95 MsnMessage * | 95 MsnMessage * |
| 96 msn_message_unref(MsnMessage *msg) | 96 msn_message_unref(MsnMessage *msg) |
| 97 { | 97 { |
| 98 g_return_val_if_fail(msg != NULL, NULL); | 98 g_return_val_if_fail(msg != NULL, NULL); |
| 99 | 99 g_return_val_if_fail(msg->ref_count > 0, NULL); |
| 100 if (msg->ref_count <= 0) | |
| 101 return NULL; | |
| 102 | 100 |
| 103 msg->ref_count--; | 101 msg->ref_count--; |
| 104 | 102 |
| 105 #ifdef MSN_DEBUG_MSG | 103 #ifdef MSN_DEBUG_MSG |
| 106 gaim_debug_info("msn", "message unref (%p)[%d]\n", msg, msg->ref_count); | 104 gaim_debug_info("msn", "message unref (%p)[%d]\n", msg, msg->ref_count); |
