Merge branch 'master' of github.com:gnustep/libs-gui into NSGridView_NSStackView_branch

This commit is contained in:
Gregory John Casamento 2020-11-27 07:24:44 -05:00
commit 4b072d3726
2 changed files with 6 additions and 10 deletions

View file

@ -1,3 +1,7 @@
2020-11-23 Riccardo <rm@gnu.org>
* Source/NSPopUpButtonCell.m (release):
Use standard setMenu: in release and avoid leaking the Menu. (Proposed by Fred)
2020-11-03 Riccardo Mottola <rm@gnu.org>
* Source/NSBitmapImageRep+JPEG.m (_JPEGRepresentationWithProperties:):

View file

@ -145,18 +145,10 @@ static NSImage *_pbc_image[5];
{
[self dismissPopUp];
}
/*
* We don't use methods here to clean up the selected item, the menu
* item and the menu as these methods internally update the menu,
* which tries to access the target of the menu item (or of this cell).
* When the popup is relases this target may already have been freed,
* so the local reference to it is invalid and will result in a
* segmentation fault.
*/
if (_menu != nil)
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc removeObserver: self name: nil object: _menu];
[self setMenu:nil];
}
_selectedItem = nil;
[super dealloc];