[goffice] Don't test ref_count we might not control.



commit 43efd23f7fc56aa19251225a3c27bd2118035d2b
Author: Morten Welinder <terra gnome org>
Date:   Sun Dec 28 18:00:57 2014 -0500

    Don't test ref_count we might not control.

 goffice/graph/gog-graph.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/goffice/graph/gog-graph.c b/goffice/graph/gog-graph.c
index b1346ab..3a85527 100644
--- a/goffice/graph/gog-graph.c
+++ b/goffice/graph/gog-graph.c
@@ -861,10 +861,6 @@ cb_graph_idle (GogGraph *graph)
 gboolean
 gog_graph_request_update (GogGraph *graph)
 {
-       /* people may try to queue an update during destruction */
-       if (G_OBJECT (graph)->ref_count <= 0)
-               return FALSE;
-
        g_return_val_if_fail (GOG_IS_GRAPH (graph), FALSE);
 
        if (graph->idle_handler == 0) { /* higher priority than canvas */
@@ -884,8 +880,8 @@ gog_graph_request_update (GogGraph *graph)
 void
 gog_graph_force_update (GogGraph *graph)
 {
-       /* people may try to queue an update during destruction */
-       while (G_OBJECT (graph)->ref_count > 0 && graph->idle_handler != 0) {
+       g_return_if_fail (GOG_IS_GRAPH (graph));
+       while (graph->idle_handler != 0) {
                g_source_remove (graph->idle_handler);
                graph->idle_handler = 0;
                gog_object_update (GOG_OBJECT (graph));


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