Mercurial > pidgin
comparison libpurple/protocols/msn/contact.c @ 28317:97856e3452d0
Don't crash is passport is NULL on Windows. I don't know why this would
happen, but there's a g_return_if_fail checking it, so it must happen at
some point.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 03 Oct 2009 20:01:35 +0000 |
parents | 7921a53b94b3 |
children | 534ff54568eb |
comparison
equal
deleted
inserted
replaced
28316:3397fb5f89cf | 28317:97856e3452d0 |
---|---|
1416 MsnCallbackState *state; | 1416 MsnCallbackState *state; |
1417 xmlnode *contact; | 1417 xmlnode *contact; |
1418 xmlnode *contact_info; | 1418 xmlnode *contact_info; |
1419 xmlnode *changes; | 1419 xmlnode *changes; |
1420 | 1420 |
1421 purple_debug_info("msn", "Update contact information with new %s: %s\n", | 1421 purple_debug_info("msn", "Update contact information for %s with new %s: %s\n", |
1422 passport ? passport : "(null)", | |
1422 type == MSN_UPDATE_DISPLAY ? "display name" : "alias", | 1423 type == MSN_UPDATE_DISPLAY ? "display name" : "alias", |
1423 value ? value : "(null)"); | 1424 value ? value : "(null)"); |
1424 purple_debug_info("msn", "passport=%s\n", passport); | |
1425 g_return_if_fail(passport != NULL); | 1425 g_return_if_fail(passport != NULL); |
1426 | |
1426 contact_info = xmlnode_new("contactInfo"); | 1427 contact_info = xmlnode_new("contactInfo"); |
1427 changes = xmlnode_new("propertiesChanged"); | 1428 changes = xmlnode_new("propertiesChanged"); |
1428 | 1429 |
1429 switch (type) { | 1430 switch (type) { |
1430 xmlnode *annotations; | 1431 xmlnode *annotations; |
1448 break; | 1449 break; |
1449 | 1450 |
1450 default: | 1451 default: |
1451 g_return_if_reached(); | 1452 g_return_if_reached(); |
1452 } | 1453 } |
1453 | |
1454 | |
1455 | 1454 |
1456 state = msn_callback_state_new(session); | 1455 state = msn_callback_state_new(session); |
1457 | 1456 |
1458 state->body = xmlnode_from_str(MSN_CONTACT_UPDATE_TEMPLATE, -1); | 1457 state->body = xmlnode_from_str(MSN_CONTACT_UPDATE_TEMPLATE, -1); |
1459 state->action = MSN_UPDATE_INFO; | 1458 state->action = MSN_UPDATE_INFO; |