[gnome-sudoku] Add check to avoid G_IS_CANCELLABLE assertion fail error



commit 364b309c836222d409571d31613ff0e6c3555373
Author: Parin Porecha <parinporecha gmail com>
Date:   Sun Mar 22 00:01:59 2015 +0530

    Add check to avoid G_IS_CANCELLABLE assertion fail error

 lib/sudoku-generator.vala |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/lib/sudoku-generator.vala b/lib/sudoku-generator.vala
index d390548..65f30c8 100644
--- a/lib/sudoku-generator.vala
+++ b/lib/sudoku-generator.vala
@@ -87,10 +87,12 @@ public class SudokuGenerator : Object
             worker.run ();
         }, (int) get_num_processors (), false);
 
-        cancellable.connect(() => {
-            ThreadPool.free((owned) pool, true, false);
-            generate_boards_async.callback();
-        });
+        if (cancellable != null) {
+            cancellable.connect(() => {
+                ThreadPool.free((owned) pool, true, false);
+                generate_boards_async.callback();
+            });
+        }
 
         for (var i = 0; i < nboards; i++)
         {


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