Blame SOURCES/rubygem-rb-inotify-0.9.7-Prevent-error-when-closing-notifier-in-watch-callback.patch

c9cbd9
From a3ff7cc8cd7c4e57a4e6d5a885d515946081239f Mon Sep 17 00:00:00 2001
c9cbd9
From: Cezary Baginski <cezary@chronomantic.net>
c9cbd9
Date: Tue, 3 May 2016 00:03:50 +0200
c9cbd9
Subject: [PATCH] Avoid crashing after fd is closed (fix: #41)
c9cbd9
c9cbd9
---
c9cbd9
 lib/rb-inotify/event.rb | 2 +-
c9cbd9
 1 file changed, 1 insertion(+), 1 deletion(-)
c9cbd9
c9cbd9
diff --git a/lib/rb-inotify/event.rb b/lib/rb-inotify/event.rb
c9cbd9
index f6e9551..11701ac 100644
c9cbd9
--- a/lib/rb-inotify/event.rb
c9cbd9
+++ b/lib/rb-inotify/event.rb
c9cbd9
@@ -125,7 +125,7 @@ def initialize(data, notifier)
c9cbd9
     #
c9cbd9
     # @private
c9cbd9
     def callback!
c9cbd9
-      watcher.callback!(self)
c9cbd9
+      watcher && watcher.callback!(self)
c9cbd9
     end
c9cbd9
 
c9cbd9
     # Returns the size of this event object in bytes,