mirror of https://github.com/mpv-player/mpv
cocoa: fix recent regression
Commit 9db50c67
changed it so that the window title can now be a NULL
string.
Completely untested. Probably fixes #2570.
This commit is contained in:
parent
159eb3f962
commit
aaa64b879e
|
@ -515,11 +515,13 @@ 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));
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue