From f4d239adc848a294d3179afddc1e45977631c02e Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 27 Mar 2003 22:31:19 +0000 Subject: guard against NULL keys 2003-03-27 JP Rosevear * e-account-list.c (e_account_list_find): guard against NULL keys svn path=/trunk/; revision=20554 --- e-util/ChangeLog | 4 ++++ e-util/e-account-list.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 07a25faf12..10524d389c 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,7 @@ +2003-03-27 JP Rosevear + + * e-account-list.c (e_account_list_find): guard against NULL keys + 2003-03-25 Dan Winship * e-dialog-utils.c (e_notice): Move this here from gal. Use diff --git a/e-util/e-account-list.c b/e-util/e-account-list.c index 7d132bf033..825601f2af 100644 --- a/e-util/e-account-list.c +++ b/e-util/e-account-list.c @@ -420,6 +420,9 @@ e_account_list_find(EAccountList *accounts, e_account_find_t type, const char *k /* this could use a callback for more flexibility ... ... but this makes the common cases easier */ + if (!key) + return NULL; + for (it = e_list_get_iterator ((EList *)accounts); e_iterator_is_valid (it); e_iterator_next (it)) { -- cgit v1.2.3