Browse Source

Don't fire callbacks after we end the subscription

Heilig Benedek 9 years ago
parent
commit
f36e2841bf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      atom/browser/api/frame_subscriber.cc

+ 1 - 1
atom/browser/api/frame_subscriber.cc

@@ -64,7 +64,7 @@ void FrameSubscriber::OnFrameDelivered(
     scoped_refptr<media::VideoFrame> frame, base::TimeTicks, bool result) {
   pending_frames--;
 
-  if (!result || RequestDestruct())
+  if (RequestDestruct() || subscriber_ == NULL || !result)
     return;
 
   v8::Locker locker(isolate_);