[gcalctool/gnome-3-0] Fix crash when not all currencies downloaded
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcalctool/gnome-3-0] Fix crash when not all currencies downloaded
- Date: Wed, 20 Apr 2011 01:52:04 +0000 (UTC)
commit 9b069281a6119b671098399f5aad842e5adac075
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Apr 20 11:51:57 2011 +1000
Fix crash when not all currencies downloaded
NEWS | 1 +
src/currency-manager.c | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index e6ad0b0..5a6e4b4 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Overview of changes in gcalctool 6.0.1
(Kjartan Maraas, Bug #646093)
* Only write to GSettings when settings change, don't sync on exit
(Bug #647327)
+ * Fix crash when not all currencies downloaded
Overview of changes in gcalctool 6.0.0
diff --git a/src/currency-manager.c b/src/currency-manager.c
index 66b6c92..c7687ba 100644
--- a/src/currency-manager.c
+++ b/src/currency-manager.c
@@ -591,9 +591,12 @@ currency_manager_get_value(CurrencyManager *manager, const gchar *currency)
if (!load_rates(manager))
return NULL;
-
+
c = currency_manager_get_currency(manager, currency);
- return currency_get_value(c);
+ if (c)
+ return currency_get_value(c);
+ else
+ return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]