Spawn.vala
authorAlan Knowles <alan@roojs.com>
Mon, 29 Aug 2016 08:59:51 +0000 (16:59 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 29 Aug 2016 08:59:51 +0000 (16:59 +0800)
Spawn.vala

index 363fb48..ab13800 100644 (file)
@@ -294,7 +294,8 @@ public class Spawn : Object
         this.out_src = (int) this.out_ch.add_watch (
             IOCondition.OUT | IOCondition.IN  | IOCondition.PRI |  IOCondition.HUP |  IOCondition.ERR  ,
             (channel, condition) => {
-               return this.read(this.out_ch);
+                
+               return this.out_ch != null ? this.read(this.out_ch) : false;
             }
         );
         this.err_src = (int) this.err_ch.add_watch (