mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 12:50:55 +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
|
@ -1,3 +1,9 @@
|
||||||
|
2009-10-20 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSDocumentController.m (-_updateOpenRecentMenu): Fix an
|
||||||
|
off by one error which would crash programs with an open recent
|
||||||
|
menu.
|
||||||
|
|
||||||
2009-10-19 Riccardo Mottola <rmottola@users.sf.net>
|
2009-10-19 Riccardo Mottola <rmottola@users.sf.net>
|
||||||
|
|
||||||
* Source/GSWindowDecorationView.h: add method declaration
|
* Source/GSWindowDecorationView.h: add method declaration
|
||||||
|
|
|
@ -1630,7 +1630,7 @@ static NSString *processName = nil;
|
||||||
{
|
{
|
||||||
[recentMenu removeItemAtIndex: 0]; // remove them all
|
[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
|
// add all items incl. a Clear List item if needed
|
||||||
NSMenuItem *item;
|
NSMenuItem *item;
|
||||||
|
|
Loading…
Reference in a new issue