diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-02-17 09:45:23 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-02-17 09:45:23 +0000 |
commit | 973aaa9d9a020e1644ce2fe45fd3613422f6ada9 (patch) | |
tree | c12c0ecfe8e9f890b7414287cd62e5085fcf0a7d /src/trg-stats-dialog.c | |
parent | c10b672d05b8b6b68bbc1ccb92da8b5caa451c68 (diff) |
a bunch of changes needed to facilitate changing trackers (unfinished). also tidy up general details panel a bit, fix a crash if a stats update is received after stats dialog is closed.
Diffstat (limited to 'src/trg-stats-dialog.c')
-rw-r--r-- | src/trg-stats-dialog.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/trg-stats-dialog.c b/src/trg-stats-dialog.c index 4674215..4c1d08c 100644 --- a/src/trg-stats-dialog.c +++ b/src/trg-stats-dialog.c @@ -199,9 +199,17 @@ static void update_time_stat(JsonObject * args, GtkTreeRowReference * rr, static void on_stats_reply(JsonObject * response, int status, gpointer data) { - TrgStatsDialogPrivate *priv = TRG_STATS_DIALOG_GET_PRIVATE(data); + TrgStatsDialogPrivate *priv; JsonObject *args; + if (!TRG_IS_STATS_DIALOG(data)) + { + response_unref(response); + return; + } + + priv = TRG_STATS_DIALOG_GET_PRIVATE(data); + if (status == CURLE_OK) { args = get_arguments(response); |