[gnome-contacts] Fix potential use of unset variables



commit af2bba449cec925b68a862999f4943297e8faf3b
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sun Aug 4 10:00:40 2013 +0200

    Fix potential use of unset variables
    
    We should set the ‘out’ variables in all branches.

 src/contacts-contact-pane.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 645c8e1..e74df07 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -62,6 +62,9 @@ public class Center : Bin {
       child.get_preferred_height (out min, out nat);
       minimum_height = min;
       natural_height = nat;
+    } else {
+      minimum_height = -1;
+      natural_height = -1;
     }
   }
 
@@ -73,6 +76,9 @@ public class Center : Bin {
       child.get_preferred_width (out min, out nat);
       minimum_width = min;
       natural_width = nat;
+    } else {
+      minimum_width = -1;
+      natural_width = -1;
     }
   }
 


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