[gnome-calculator] Fixed critical warning after first operation (bgo#785108)



commit 6afdcfd1cdd135302560ff565c1e28e7d057c7f5
Author: Robert Roth <robert roth off gmail com>
Date:   Thu Nov 2 08:33:06 2017 +0200

    Fixed critical warning after first operation (bgo#785108)

 src/math-variable-popover.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/math-variable-popover.vala b/src/math-variable-popover.vala
index 17c2f87..776c96b 100644
--- a/src/math-variable-popover.vala
+++ b/src/math-variable-popover.vala
@@ -55,7 +55,9 @@ public class MathVariablePopover : Gtk.Popover
 
     private void handler (string answer, Number number, int number_base, uint representation_base)
     {
-        variable_list.remove (find_row_for_variable ("_"));
+        var row = find_row_for_variable ("_");
+        if (row != null)
+            variable_list.remove (row);
         variable_list.add (make_variable_row ("_", number));
     }
 


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