diff --git a/ChangeLog b/ChangeLog index 2b08e70d9..ade5a8f8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-10-20 Wolfgang Lux + + * Source/NSDocumentController.m (-_updateOpenRecentMenu): Fix an + off by one error which would crash programs with an open recent + menu. + 2009-10-19 Riccardo Mottola * Source/GSWindowDecorationView.h: add method declaration diff --git a/Source/NSDocumentController.m b/Source/NSDocumentController.m index e49a6dc28..313559454 100644 --- a/Source/NSDocumentController.m +++ b/Source/NSDocumentController.m @@ -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;