From 648cc13845c4bb212460e4960896a0541e5b8b59 Mon Sep 17 00:00:00 2001 From: Marcus Fritzsch Date: Mon, 19 Jun 2017 13:52:10 +0200 Subject: wayland: minor fix with this-> and formatting Signed-off-by: Marcus Fritzsch --- src/wayland.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/wayland.cpp') diff --git a/src/wayland.cpp b/src/wayland.cpp index c19b0dc..b4f4800 100644 --- a/src/wayland.cpp +++ b/src/wayland.cpp @@ -53,8 +53,9 @@ constexpr struct wl_registry_listener registry_listener = { } registry::registry(struct wl_display *d) - : wayland_proxy(wl_display_get_registry(d)) { - wl_registry_add_listener(this->proxy, ®istry_listener, this); + : wayland_proxy(!d ? nullptr : wl_display_get_registry(d)) { + if (this->proxy) + wl_registry_add_listener(this->proxy, ®istry_listener, this); } registry::~registry() { -- cgit 1.2.3-korg