diff options
author | wm4 <wm4@nowhere> | 2015-12-07 00:49:36 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-07 00:49:36 +0100 |
commit | aaa64b879e3e54ece97e9babdd7e13127974a449 (patch) | |
tree | baf291be340ace8753b0498566a09b54a6331f03 | |
parent | 159eb3f962b845c861b5f10da35fcc12e1e6cb15 (diff) |
cocoa: fix recent regression
Commit 9db50c67 changed it so that the window title can now be a NULL
string.
Completely untested. Probably fixes #2570.
-rw-r--r-- | video/out/cocoa_common.m | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index ab2f666c3e..2cb365cc1f 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -515,10 +515,12 @@ static int cocoa_set_window_title(struct vo *vo) void *talloc_ctx = talloc_new(NULL); struct bstr btitle = bstr_sanitize_utf8_latin1(talloc_ctx, bstr0(s->window_title)); - NSString *nstitle = [NSString stringWithUTF8String:btitle.start]; - if (nstitle) { - [s->window setTitle: nstitle]; - [s->window displayIfNeeded]; + if (btitle.start) { + NSString *nstitle = [NSString stringWithUTF8String:btitle.start]; + if (nstitle) { + [s->window setTitle: nstitle]; + [s->window displayIfNeeded]; + } } talloc_free(talloc_ctx); return VO_TRUE; |