mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
macos: do not crash in mojave
The localizedName property is not available in Mojave so just ifdef in that case the code out.
This commit is contained in:
parent
d5963ad109
commit
4ad5e77907
@ -145,6 +145,7 @@ GetSubpixelLayout (CGDirectDisplayID screen_id)
|
|||||||
static char *
|
static char *
|
||||||
GetLocalizedName (NSScreen *screen)
|
GetLocalizedName (NSScreen *screen)
|
||||||
{
|
{
|
||||||
|
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER
|
||||||
GDK_BEGIN_MACOS_ALLOC_POOL;
|
GDK_BEGIN_MACOS_ALLOC_POOL;
|
||||||
|
|
||||||
NSString *str;
|
NSString *str;
|
||||||
@ -158,6 +159,9 @@ GetLocalizedName (NSScreen *screen)
|
|||||||
GDK_END_MACOS_ALLOC_POOL;
|
GDK_END_MACOS_ALLOC_POOL;
|
||||||
|
|
||||||
return g_steal_pointer (&name);
|
return g_steal_pointer (&name);
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
Loading…
Reference in New Issue
Block a user