From 0f5d459ed8c0c1df7d9669c6112b6840bae3e50f Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Tue, 23 Oct 2012 11:21:42 +0100 Subject: [PATCH] Fixed: collection view crash on unepexted drag events. --- AppKit/CPCollectionView.j | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AppKit/CPCollectionView.j b/AppKit/CPCollectionView.j index 813b4573d..e1c934f4c 100644 --- a/AppKit/CPCollectionView.j +++ b/AppKit/CPCollectionView.j @@ -690,6 +690,10 @@ - (void)mouseDragged:(CPEvent)anEvent { + // Don't crash if we never registered the intial click. + if (!_mouseDownEvent) + return; + var locationInWindow = [anEvent locationInWindow], mouseDownLocationInWindow = [_mouseDownEvent locationInWindow];