mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 16:00:05 +01:00
XQuartz: Add some sanity checking and a fallback for the bundle id.
This way we'll print an error and still mostly work rather than crashing if
someone installs XQuartz.app incorrectly or tries running the server within
the build system rather than the installed system.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 88ad050f3c)
This commit is contained in:
parent
64ea1ac320
commit
55ef10975e
1 changed files with 5 additions and 0 deletions
|
|
@ -992,6 +992,11 @@ void X11ApplicationMain (int argc, char **argv, char **envp) {
|
|||
|
||||
app_prefs_domain_cfstr = (CFStringRef)[[NSBundle mainBundle] bundleIdentifier];
|
||||
|
||||
if (app_prefs_domain_cfstr == NULL) {
|
||||
ErrorF("X11ApplicationMain: Unable to determine bundle identifier. Your installation of XQuartz may be broken.\n");
|
||||
app_prefs_domain_cfstr = @BUNDLE_ID_PREFIX".X11";
|
||||
}
|
||||
|
||||
[NSApp read_defaults];
|
||||
[NSBundle loadNibNamed:@"main" owner:NSApp];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:NSApp
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue