Skip to content

Commit

Permalink
* mu: fix pre-condition warning when getting related messages without…
Browse files Browse the repository at this point in the history
… threads
  • Loading branch information
djcb committed Mar 16, 2013
1 parent dbbcaf0 commit 342195a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/mu-msg-iter.cc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -405,7 +405,10 @@ const MuMsgIterThreadInfo*
mu_msg_iter_get_thread_info (MuMsgIter *iter) mu_msg_iter_get_thread_info (MuMsgIter *iter)
{ {
g_return_val_if_fail (!mu_msg_iter_is_done(iter), NULL); g_return_val_if_fail (!mu_msg_iter_is_done(iter), NULL);
g_return_val_if_fail (iter->thread_hash(), NULL);
/* maybe we don't have thread info */
if (!iter->thread_hash())
return NULL;


try { try {
const MuMsgIterThreadInfo *ti; const MuMsgIterThreadInfo *ti;
Expand Down
1 change: 1 addition & 0 deletions lib/mu-msg-iter.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ typedef struct _MuMsgIterThreadInfo MuMsgIterThreadInfo;
/** /**
* get a the MuMsgThreaderInfo struct for this message; this only * get a the MuMsgThreaderInfo struct for this message; this only
* works when you created the mu-msg-iter with threading enabled * works when you created the mu-msg-iter with threading enabled
* (otherwise, return NULL)
* *
* @param iter a valid MuMsgIter iterator * @param iter a valid MuMsgIter iterator
* *
Expand Down
2 changes: 1 addition & 1 deletion mu/mu-cmd.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ show_usage (void)
{ {
g_print ("usage: mu command [options] [parameters]\n"); g_print ("usage: mu command [options] [parameters]\n");
g_print ("where command is one of index, find, cfind, view, mkdir, " g_print ("where command is one of index, find, cfind, view, mkdir, "
"extract, add, remove, stats, verify or server\n"); "extract, add, remove, script, verify or server\n");
g_print ("see the mu, mu-<command> or mu-easy manpages for " g_print ("see the mu, mu-<command> or mu-easy manpages for "
"more information\n"); "more information\n");
} }
Expand Down

0 comments on commit 342195a

Please sign in to comment.