[chronojump] Fixes crash: returns the key and not a key named "key".
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixes crash: returns the key and not a key named "key".
- Date: Wed, 26 Oct 2016 16:51:31 +0000 (UTC)
commit 5746375806590d921f11fae467ae5e9da64ced56
Author: Carles Pina i Estany <carles pina cat>
Date: Wed Oct 26 18:50:40 2016 +0200
Fixes crash: returns the key and not a key named "key".
src/json.cs | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/json.cs b/src/json.cs
index 4814f26..1d16a35 100644
--- a/src/json.cs
+++ b/src/json.cs
@@ -252,7 +252,7 @@ class JsonUtils
// Returns jsonObject[key] if it exists. If the key doesn't exist returns defaultValue and
// logs the anomaly into the Chronojump log.
if (jsonObject.ContainsKey (key)) {
- return jsonObject ["key"];
+ return jsonObject [key];
} else {
LogB.Information ("JsonUtils::valueOrDefault: returning default (" + defaultValue +
") from JSON: " + jsonObject.ToString ());
return defaultValue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]