[gnome-boxes/gnome-3-14] vnc-display: Correctly cast to DisplayCredential



commit ea93254457f565a6d760e09819816b94321b6dfe
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Oct 24 19:23:07 2014 +0100

    vnc-display: Correctly cast to DisplayCredential
    
    DisplayCredential is not a class so you can't use 'as' operator to cast
    to this type.
    
    This together with previous patch, fixes a crash that always happens if
    you try to connect to a VNC box that has password on it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736099

 src/vnc-display.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/vnc-display.vala b/src/vnc-display.vala
index 6be5914..67213ff 100644
--- a/src/vnc-display.vala
+++ b/src/vnc-display.vala
@@ -47,7 +47,7 @@ private class Boxes.VncDisplay: Boxes.Display {
 
         display.vnc_auth_credential.connect ((creds) => {
             foreach (var cred in creds) {
-                var credential = cred as DisplayCredential;
+                var credential = (DisplayCredential) cred;
 
                 switch (credential) {
                 case DisplayCredential.USERNAME:


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