[grilo] tests: avoid critical warning on test



commit 41f66e904af762df4845cb7c521324519cc97f11
Author: Victor Toso <me victortoso com>
Date:   Thu Sep 15 17:38:42 2016 +0200

    tests: avoid critical warning on test
    
    As timeout might not be used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771338

 tests/lib-net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tests/lib-net.c b/tests/lib-net.c
index be1c152..5830729 100644
--- a/tests/lib-net.c
+++ b/tests/lib-net.c
@@ -117,7 +117,8 @@ test_net_wc_throttling_cb (GObject *source_object,
   f->num_operations--;
 
   if (f->num_operations == 0) {
-    g_source_remove(f->timeout);
+    if (f->timeout > 0)
+        g_source_remove(f->timeout);
     g_main_loop_quit (f->loop);
   }
 }


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