[gnome-calculator] Check for null on variables ought to autocomplete (fixes #762426)



commit 81ac3210b8950fd25f9572518db25da761a9aa71
Author: Alberto Ruiz <aruiz gnome org>
Date:   Mon Feb 29 20:16:58 2016 +0000

    Check for null on variables ought to autocomplete (fixes #762426)

 lib/math-variables.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/lib/math-variables.vala b/lib/math-variables.vala
index a3932e2..63b7191 100644
--- a/lib/math-variables.vala
+++ b/lib/math-variables.vala
@@ -127,6 +127,8 @@ public class MathVariables : Object
         string[] variables = get_names ();
         foreach (var variable in variables)
         {
+            if (variable == null)
+                break;
             if (variable.has_prefix (text))
                 eligible_variables += variable;
         }


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