[gnome-robots] Fix build



commit a2fefda03ccab41f4fc25e2f12f6f296f85a70b8
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Sep 21 11:27:54 2014 -0500

    Fix build
    
    And miscellaneous cleanups

 src/game.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/game.c b/src/game.c
index b935a0e..b2fcbaa 100644
--- a/src/game.c
+++ b/src/game.c
@@ -231,11 +231,16 @@ log_score (gint sc)
   }
 
   if (sc != 0) {
-  //  games_scores_set_category (highscores, sbuf);
     const gchar* key = sbuf;
     const gchar* name = category_name_from_key (key);
+    GError *error = NULL;
     current_cat = games_scores_category_new (key, name);
-    pos = games_scores_context_add_score (highscores, (guint32) sc, current_cat);
+    // FIXME returns a bool, not the position...
+    pos = games_scores_context_add_score (highscores, (guint32) sc, current_cat, &error);
+    if (error != NULL) {
+      g_warning ("Failed to add score: %s", error->message);
+      g_error_free (error);
+    }
   }
   g_free (sbuf);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]