[vinagre/gnome-3-6] Do not use NULL attributes with libsecret



commit b1e29b74002b227f3dea48a55eeb368ca37cb890
Author: David King <amigadave amigadave com>
Date:   Mon Nov 12 20:58:17 2012 +0000

    Do not use NULL attributes with libsecret
    
    Fixes bug 685041.

 plugins/vnc/vinagre-vnc-tab.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/vnc/vinagre-vnc-tab.c b/plugins/vnc/vinagre-vnc-tab.c
index 10bed13..7cae9f2 100644
--- a/plugins/vnc/vinagre-vnc-tab.c
+++ b/plugins/vnc/vinagre-vnc-tab.c
@@ -492,7 +492,12 @@ vnc_authentication_cb (VncDisplay *vnc, GValueArray *credList, VinagreVncTab *vn
 
   if (need_password || need_username)
     {
-      vinagre_tab_find_credentials_in_keyring (tab, &username, &password);
+      /* libsecret does not support NULL attributes, bug 685041. */
+      if (vinagre_connection_get_username (conn) != NULL)
+        {
+          vinagre_tab_find_credentials_in_keyring (tab, &username, &password);
+        }
+
       if ( (need_username && !username) || (need_password && !password) )
 	{
 	  host = vinagre_connection_get_best_name (conn);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]