[gnome-calculator] Reset the serializer error.
- From: Arth Patel <arthpatel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] Reset the serializer error.
- Date: Mon, 22 Dec 2014 21:51:48 +0000 (UTC)
commit ada25331d634d60b6ffdade75780fe249680bd21
Author: Daniel Renninghoff <daniel renninghoff gmail com>
Date: Mon Dec 22 21:31:26 2014 +0100
Reset the serializer error.
src/gcalccmd.vala | 3 +++
src/math-equation.vala | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gcalccmd.vala b/src/gcalccmd.vala
index dc8783e..87ad8ad 100644
--- a/src/gcalccmd.vala
+++ b/src/gcalccmd.vala
@@ -37,7 +37,10 @@ static void solve (string equation)
{
var str = result_serializer.to_string (z);
if (result_serializer.error != null)
+ {
stderr.printf ("%s\n", result_serializer.error);
+ result_serializer.error = null;
+ }
else
stdout.printf ("%s\n", str);
}
diff --git a/src/math-equation.vala b/src/math-equation.vala
index fa60685..e4488b7 100644
--- a/src/math-equation.vala
+++ b/src/math-equation.vala
@@ -785,6 +785,7 @@ public class MathEquation : Gtk.SourceBuffer
if (serializer.error != null)
{
status = serializer.error;
+ serializer.error = null;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]