2007-08-31 mcrha Part of fix for bug #378759
authorMilan Crha <mcrha@src.gnome.org>
Fri, 31 Aug 2007 05:59:29 +0000 (05:59 +0000)
committerMilan Crha <mcrha@src.gnome.org>
Fri, 31 Aug 2007 05:59:29 +0000 (05:59 +0000)
svn path=/trunk/; revision=8020

libedataserverui/ChangeLog
libedataserverui/e-passwords.c

index 3f66ebb..669258e 100644 (file)
@@ -1,3 +1,10 @@
+2007-08-31  Milan Crha  <mcrha@redhat.com>
+
+       ** Part of fix for bug #378759
+
+       * e-passwords.c: (e_passwords_ask_password): Added tests for non-NULL
+       component_name and key parameters.
+
 2007-08-19  Kevin Piche  <kpiche@gmail.com>
 
        ** Fix for bug #464569
index 2191940..a1fe0cd 100644 (file)
@@ -1102,11 +1102,15 @@ e_passwords_ask_password (const char *title, const char *component_name,
                          GtkWindow *parent)
 {
        char *passwd;
-       EPassMsg *msg = ep_msg_new(ep_ask_password);
+       EPassMsg *msg;
+
+       g_return_val_if_fail (component_name != NULL, NULL);
+       g_return_val_if_fail (key != NULL, NULL);
 
        if ((type & E_PASSWORDS_ONLINE) && !ep_online_state)
                return NULL;
 
+       msg = ep_msg_new (ep_ask_password);
        msg->title = title;
        msg->component = component_name;
        msg->key = key;