[vlc-commits] macosx: fix conditional crash when setting the MRL field
Felix Paul Kühne
git at videolan.org
Tue Jul 2 23:18:17 CEST 2013
vlc/vlc-2.0 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Tue Jul 2 23:11:40 2013 +0200| [5153494af857fa04c1eea488f5d04734ce2eabcb] | committer: Felix Paul Kühne
macosx: fix conditional crash when setting the MRL field
(cherry picked from commit 04b45e8ffd279a6df19ff96d6157a688bd6b7a08)
Conflicts:
modules/gui/macosx/open.m
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=5153494af857fa04c1eea488f5d04734ce2eabcb
---
modules/gui/macosx/open.m | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 88b9614..b1fb842 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -278,10 +278,15 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (void)setMRL:(NSString *)newMRL
{
+ if (!newMRL)
+ newMRL = @"";
+ if (o_mrl)
+ [o_mrl release];
+
[o_mrl release];
o_mrl = newMRL;
[o_mrl retain];
- [o_mrl_fld setStringValue: newMRL];
+ [o_mrl_fld performSelectorOnMainThread:@selector(setStringValue:) withObject:o_mrl waitUntilDone:NO];
if ([o_mrl length] > 0)
[o_btn_ok setEnabled: YES];
else
More information about the vlc-commits
mailing list