[gnome-robots/libgames-scores: 12/14] Return NULL as category if non standard category key.
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-robots/libgames-scores: 12/14] Return NULL as category if non standard category key.
- Date: Sun, 21 Sep 2014 16:13:33 +0000 (UTC)
commit 85255b77fe8575b0507687d75009c40aaa7d20c4
Author: Nikhar Agrawal <nikharagrawal2006 gmail com>
Date: Mon Aug 18 01:55:56 2014 +0530
Return NULL as category if non standard category key.
src/gnome-robots.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-robots.c b/src/gnome-robots.c
index 69326ae..4ab850d 100644
--- a/src/gnome-robots.c
+++ b/src/gnome-robots.c
@@ -330,12 +330,14 @@ gchar* name_from_key (gchar* key)
return scorecats[i].name;
}
/*Return key as is if match not found*/
- return key;
+ return NULL;
}
GamesScoresCategory *create_category_from_key (GamesScoresContext *context, const char *key, gpointer
user_data)
{
gchar *name = name_from_key (key);
+ if (name == NULL)
+ return NULL;
return games_scores_category_new (key, name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]