File bnc945603-fix-undo-ans-error.patch of Package gnome-calculator.1564

Index: gnome-calculator-3.10.2/src/math-equation.vala
===================================================================
--- gnome-calculator-3.10.2.orig/src/math-equation.vala
+++ gnome-calculator-3.10.2/src/math-equation.vala
@@ -487,6 +487,13 @@ public class MathEquation : Gtk.TextBuff
         status = ("");
         undo_stack.remove (state);
         redo_stack.prepend (get_current_state ());
+        if (undo_stack == null)
+        {
+            apply_state (state);
+            return;
+        }
+
+        state.ans = undo_stack.nth_data (0).ans;
 
         apply_state (state);
     }
openSUSE Build Service is sponsored by