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

# Conflicts:
#	ChangeLog
This commit is contained in:
fredkiefer 2020-11-29 23:08:15 +01:00
commit 59b4b15f7e
2 changed files with 7 additions and 10 deletions

View file

@ -3,6 +3,11 @@
* Source/NSMenuView.m (-mouseDown:): Protect against _window going
away during tracking.
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];