[gnome-calculator/gnome-3-12] 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-12] fixes segmentation fault error on repeatedly clicking undo
- Date: Tue, 17 Jun 2014 18:34:08 +0000 (UTC)
commit fbd9eb408901c8d246e54ab44cbe3ef14f93568e
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 160d923..eca91f6 100644
--- a/src/math-equation.vala
+++ b/src/math-equation.vala
@@ -487,8 +487,14 @@ public class MathEquation : Gtk.SourceBuffer
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]