ephyr: Avoid a segfault with 'DISPLAY= Xephy -glamor'
ephyr_glamor_connect() returns NULL if we failed, but applying
xcb_connection_has_error() to NULL is not permitted.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit f42520c5f1
)
This commit is contained in:
parent
dee92c7805
commit
74ab42c85b
|
@ -443,7 +443,7 @@ hostx_init(void)
|
|||
else
|
||||
#endif
|
||||
HostX.conn = xcb_connect(NULL, &HostX.screen);
|
||||
if (xcb_connection_has_error(HostX.conn)) {
|
||||
if (!HostX.conn || xcb_connection_has_error(HostX.conn)) {
|
||||
fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue