From 62b2cd734e684a93d1b9215aa8044c620939170d Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 24 Sep 2013 00:11:51 +0200 Subject: fix crash on uninitialized unittracker for spinbuttons. fixes crash on changing major grid line number, possibly other random crashes Fixed bugs: - https://launchpad.net/bugs/1229183 (bzr r12581) --- src/ui/widget/spinbutton.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/widget/spinbutton.cpp') diff --git a/src/ui/widget/spinbutton.cpp b/src/ui/widget/spinbutton.cpp index 62c17f821..1114ff32b 100644 --- a/src/ui/widget/spinbutton.cpp +++ b/src/ui/widget/spinbutton.cpp @@ -65,7 +65,7 @@ int SpinButton::on_input(double* newvalue) bool SpinButton::on_my_focus_in_event(GdkEventFocus* /*event*/) { - on_focus_in_value = get_value(); + _on_focus_in_value = get_value(); return false; // do not consume the event } @@ -92,7 +92,7 @@ bool SpinButton::on_my_key_press_event(GdkEventKey* event) void SpinButton::undo() { - set_value(on_focus_in_value); + set_value(_on_focus_in_value); } -- cgit v1.2.3