[gnome-calculator/gnome-3-10] fixes segmentation fault error on repeatedly clicking undo
- From: Arth Patel <arthpatel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/gnome-3-10] fixes segmentation fault error on repeatedly clicking undo
- Date: Sun, 14 Sep 2014 18:41:35 +0000 (UTC)
commit 965e446bc5322797e56f1fc03d8f8b53ab502977
Author: elitalobo <loboelita gmail com>
Date: Tue Jun 17 00:16:09 2014 +0530
fixes segmentation fault error on repeatedly clicking undo
src/math-equation.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/math-equation.vala b/src/math-equation.vala
index a8c19b0..fbac7d7 100644
--- a/src/math-equation.vala
+++ b/src/math-equation.vala
@@ -487,8 +487,14 @@ public class MathEquation : Gtk.TextBuffer
status = ("");
undo_stack.remove (state);
redo_stack.prepend (get_current_state ());
- state.ans = undo_stack.nth_data (0).ans;
+ if (undo_stack == null)
+ {
+ apply_state (state);
+ return;
+ }
+
+ state.ans = undo_stack.nth_data (0).ans;
apply_state (state);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]