Code Review
/
src
/
agl-compositor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
grpc-proxy: Don't attempt to connect if there's no compositor running
[src/agl-compositor.git]
/
grpc-proxy
/
main-grpc.cpp
diff --git
a/grpc-proxy/main-grpc.cpp
b/grpc-proxy/main-grpc.cpp
index
5b07d64
..
a8c1c5e
100644
(file)
--- a/
grpc-proxy/main-grpc.cpp
+++ b/
grpc-proxy/main-grpc.cpp
@@
-386,6
+386,9
@@
__register_shell_init(void)
struct shell_data_init *sh = new struct shell_data_init;
wl_display = wl_display_connect(NULL);
struct shell_data_init *sh = new struct shell_data_init;
wl_display = wl_display_connect(NULL);
+ if (!wl_display) {
+ goto err;
+ }
registry = wl_display_get_registry(wl_display);
sh->wait_for_bound = true;
sh->bound_fail = false;
registry = wl_display_get_registry(wl_display);
sh->wait_for_bound = true;
sh->bound_fail = false;
@@
-480,6
+483,10
@@
start_agl_shell_client(void)
struct shell_data *sh = new struct shell_data;
struct shell_data *sh = new struct shell_data;
+ if (!wl_display) {
+ goto err;
+ }
+
sh->wl_display = wl_display;
sh->wait_for_doas = true;
sh->wait_for_bound = true;
sh->wl_display = wl_display;
sh->wait_for_doas = true;
sh->wait_for_bound = true;