Bug 300995, crash when dragging bookmark buttons to (re)move when built against SDK >= 10.3. Retain disappearing object. r=pink sr=smfr

This commit is contained in:
mark%moxienet.com 2005-07-18 19:20:00 +00:00
Родитель 6dd0bb52e9
Коммит 378d3f5f3b
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -287,6 +287,11 @@
// kCaminoBookmarkListPBoardType
NSArray *pointerArray = [BookmarkManager serializableArrayWithBookmarkItems:[NSArray arrayWithObject:item]];
[pboard setPropertyList:pointerArray forType: kCaminoBookmarkListPBoardType];
// If the drag results in the bookmark button being (re)moved, it could get
// deallocated too soon. This occurs with SDK >= 10.3, but not earlier.
// Change in cleanup strategy? Hold on tight.
[[self retain] autorelease];
[self dragImage: [MainController createImageForDragging:[self image] title:title]
at: NSMakePoint(0,NSHeight([self bounds])) offset: NSMakeSize(0,0)
event: aEvent pasteboard: pboard source: self slideBack: YES];