mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 10:01:21 +00:00
Fix an off by one error which would crash programs with an open recent
menu. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28860 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
24895d987e
commit
9fc52af6f3
2 changed files with 7 additions and 1 deletions
|
@ -1630,7 +1630,7 @@ static NSString *processName = nil;
|
|||
{
|
||||
[recentMenu removeItemAtIndex: 0]; // remove them all
|
||||
}
|
||||
for (i = [_recent_documents count]; i >= -2; i--)
|
||||
for (i = [_recent_documents count] - 1; i >= -2; i--)
|
||||
{
|
||||
// add all items incl. a Clear List item if needed
|
||||
NSMenuItem *item;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue