Mercurial > pidgin
comparison src/gtksavedstatuses.c @ 12856:be1cd5952a48
[gaim-migrate @ 15207]
Avoid crashing when the account has no statuses (e.g. an account for which the prpl can't be found/loaded)
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Fri, 13 Jan 2006 01:02:56 +0000 |
parents | 292a846fdeea |
children | 03f690fcb78e |
comparison
equal
deleted
inserted
replaced
12855:f9401180115a | 12856:be1cd5952a48 |
---|---|
1276 GaimStatusType *type; | 1276 GaimStatusType *type; |
1277 char *id = NULL; | 1277 char *id = NULL; |
1278 char *message = NULL; | 1278 char *message = NULL; |
1279 const char *name = NULL; | 1279 const char *name = NULL; |
1280 | 1280 |
1281 gtk_combo_box_get_active_iter(dialog->box, &iter); | 1281 if (!gtk_combo_box_get_active_iter(dialog->box, &iter)) { |
1282 gtk_widget_destroy(dialog->window); | |
1283 g_free(dialog); | |
1284 return; | |
1285 } | |
1286 | |
1282 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, | 1287 gtk_tree_model_get(GTK_TREE_MODEL(dialog->model), &iter, |
1283 SUBSTATUS_COLUMN_ACCOUNT, &account, | 1288 SUBSTATUS_COLUMN_ACCOUNT, &account, |
1284 SUBSTATUS_COLUMN_STATUS_ID, &id, | 1289 SUBSTATUS_COLUMN_STATUS_ID, &id, |
1285 -1); | 1290 -1); |
1286 type = gaim_account_get_status_type(account, id); | 1291 type = gaim_account_get_status_type(account, id); |