Commit ae3028cc authored by Romain Bignon's avatar Romain Bignon

fix crash on empty messages

parent 7aaf2a24
Pipeline #2 failed with stages
......@@ -155,7 +155,7 @@ CoinCoinMessage* coincoin_message_new(gint64 id, xmlnode* post)
/* Skip chars before message. */
ptr = data = xmlnode_get_data(message);
while(ptr && (*ptr == '\t' || *ptr == '\n' || *ptr == '\r'))
while(ptr && *ptr && (*ptr == '\t' || *ptr == '\n' || *ptr == '\r'))
++ptr;
msg = g_new0(CoinCoinMessage, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment