Mercurial > pidgin
comparison src/protocols/msn/command.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 | a1aa681f1448 |
children | 995aea35b05c |
comparison
equal
deleted
inserted
replaced
12249:064a2c28ceec | 12250:5e2a365af01b |
---|---|
104 | 104 |
105 MsnCommand * | 105 MsnCommand * |
106 msn_command_unref(MsnCommand *cmd) | 106 msn_command_unref(MsnCommand *cmd) |
107 { | 107 { |
108 g_return_val_if_fail(cmd != NULL, NULL); | 108 g_return_val_if_fail(cmd != NULL, NULL); |
109 | 109 g_return_val_if_fail(cmd->ref_count > 0, NULL); |
110 if (cmd->ref_count <= 0) | |
111 return NULL; | |
112 | 110 |
113 cmd->ref_count--; | 111 cmd->ref_count--; |
114 | 112 |
115 if (cmd->ref_count == 0) | 113 if (cmd->ref_count == 0) |
116 { | 114 { |