quartz: Null check title before setting it
This avoids a crash in objective-c. https://bugzilla.gnome.org/show_bug.cgi?id=695278
This commit is contained in:

committed by
Aleksander Morgado

parent
3087e8b74e
commit
776fc82bd5
@ -2722,8 +2722,10 @@ gdk_window_set_decorations (GdkWindow *window,
|
||||
* NSTitledWindowMask. This behaved extremely oddly when
|
||||
* conditionalized upon that and since it has no side effects (i.e.
|
||||
* if NSTitledWindowMask is not requested, the title will not be
|
||||
* displayed) just do it unconditionally.
|
||||
* displayed) just do it unconditionally. We also must null check
|
||||
* 'title' before setting it to avoid crashing.
|
||||
*/
|
||||
if (title)
|
||||
[impl->toplevel setTitle:title];
|
||||
}
|
||||
else
|
||||
@ -2744,6 +2746,7 @@ gdk_window_set_decorations (GdkWindow *window,
|
||||
screen:screen];
|
||||
[impl->toplevel setHasShadow: window_type_hint_to_shadow (impl->type_hint)];
|
||||
[impl->toplevel setLevel: window_type_hint_to_level (impl->type_hint)];
|
||||
if (title)
|
||||
[impl->toplevel setTitle:title];
|
||||
[impl->toplevel setBackgroundColor:bg];
|
||||
[impl->toplevel setHidesOnDeactivate: window_type_hint_to_hides_on_deactivate (impl->type_hint)];
|
||||
|
Reference in New Issue
Block a user