From e8fe1e33a94b5721a6d5ecac8c6668994353f116 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Tue, 26 Jul 2005 02:24:54 +0000 Subject: [PATCH] Added explicit check for item == nil. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21540 72102866-910b-0410-8b05-ffd578937521 --- Source/NSOutlineView.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/NSOutlineView.m b/Source/NSOutlineView.m index 5e6a63af6..336cd662a 100644 --- a/Source/NSOutlineView.m +++ b/Source/NSOutlineView.m @@ -521,6 +521,9 @@ static NSImage *unexpandable = nil; */ - (int)rowForItem: (id)item { + if(item == nil) + return -1; + int row = [_items indexOfObject: item]; return (row == NSNotFound) ? -1 : row; }