From db9f7974edfd2a5137960a05e5cee3516b0a3417 Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Tue, 2 Dec 2014 12:36:01 +0000 Subject: [PATCH] Fixed #4249 by add retain count for extension string --- src/lib/platform/OSXDragView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/platform/OSXDragView.m b/src/lib/platform/OSXDragView.m index d32c493a..81c14e30 100644 --- a/src/lib/platform/OSXDragView.m +++ b/src/lib/platform/OSXDragView.m @@ -98,7 +98,9 @@ clearDropTarget - (void) setFileExt:(NSString*) ext { - m_dragFileExt = [NSString stringWithString:ext]; + [ext retain]; + [m_dragFileExt release]; + m_dragFileExt = ext; NSLog(@"drag file ext: %@", m_dragFileExt); }