mirror of https://github.com/djcb/mu.git
mu-threader: debugging for some reported problem in find_or_create
This commit is contained in:
parent
182974bbc7
commit
99f08c50c4
|
@ -156,6 +156,7 @@ find_or_create (GHashTable *id_table, MuMsg *msg, guint docid)
|
|||
{
|
||||
MuContainer *c;
|
||||
const char* msgid;
|
||||
char fake[32];
|
||||
|
||||
g_return_val_if_fail (msg, NULL);
|
||||
g_return_val_if_fail (docid != 0, NULL);
|
||||
|
@ -163,8 +164,14 @@ find_or_create (GHashTable *id_table, MuMsg *msg, guint docid)
|
|||
msgid = mu_msg_get_msgid (msg);
|
||||
if (!msgid)
|
||||
msgid = mu_msg_get_path (msg); /* fake it */
|
||||
if (!msgid) { /* no path either? seems to happen... */
|
||||
g_warning ("message without path");
|
||||
snprintf (fake, sizeof(fake), "fake:%p", (gpointer)msg);
|
||||
}
|
||||
|
||||
c = g_hash_table_lookup (id_table, msgid);
|
||||
/* XXX the '<none>' works around a crash; find a better
|
||||
* solution */
|
||||
c = g_hash_table_lookup (id_table, msgid ? msgid : fake);
|
||||
|
||||
/* If id_table contains an empty MuContainer for this ID: * *
|
||||
* Store this message in the MuContainer's message slot. */
|
||||
|
|
Loading…
Reference in New Issue