summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-04-25 17:36:17 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-04-25 17:36:17 +0100
commitaefa675dbbd1ce0296c9322e02e238d1cc181f01 (patch)
tree0e8b07522176893f1c8c775a37eea5afa16c44fc
parent7c8f37f3755ffa04daf3860e878f279a5ecfba90 (diff)
Remove the pending update first, before modifying the store.
-rw-r--r--src/allocators-store.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/allocators-store.c b/src/allocators-store.c
index fe696ac..e7d3a4d 100644
--- a/src/allocators-store.c
+++ b/src/allocators-store.c
@@ -474,6 +474,11 @@ allocators_store_reset_sums (AllocatorsStore *store)
{
struct _sum_allocator *sum;
+ if (store->update) {
+ g_source_remove (store->update);
+ store->update = 0;
+ }
+
for (sum = store->sums; sum != NULL; sum = sum->next) {
sum->old_index = sum->index;
sum->index = -1;
@@ -672,11 +677,5 @@ allocators_store_update_from_allocators (AllocatorsStore *store,
}
}
- if (store->update) {
- g_source_remove (store->update);
- store->update = 0;
- }
-
_allocators_store_update (store);
-
}