fix occasional exception while dragging

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30234 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
dpsimons 2010-04-24 19:43:35 +00:00
parent a3603ff386
commit 08f19c72bf
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2010-04-24 Doug Simons <doug.simons@testplant.com>
* Source/NSOutlineView.m:
Fix occasional exception while dragging.
2010-04-24 Doug Simons <doug.simons@testplant.com> 2010-04-24 Doug Simons <doug.simons@testplant.com>
* Source/NSWindow.m: * Source/NSWindow.m:

View file

@ -1359,7 +1359,7 @@ Also returns the child index relative to this parent. */
/* If we have been hovering over an item for more than half a second, /* If we have been hovering over an item for more than half a second,
* we should expand it. * we should expand it.
*/ */
if ([lastDragUpdate timeIntervalSinceDate: lastDragChange] >= 0.5) if (lastDragChange != nil && [lastDragUpdate timeIntervalSinceDate: lastDragChange] >= 0.5)
{ {
id item = [_items objectAtIndex: row]; id item = [_items objectAtIndex: row];
if ([self isExpandable: item] && ![self isItemExpanded: item]) if ([self isExpandable: item] && ![self isItemExpanded: item])