git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commitd2e4931445168415fee7ae53bd8053ecf89694f7
parent277d97ee66
authorIsaac Freund <[email protected]>
date2020-07-06 16:10
xwayland: don't crash on null title

 river/XwaylandView.zig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/river/XwaylandView.zig b/river/XwaylandView.zig
index a18a105..6b54e26 100644
--- a/river/XwaylandView.zig
+++ b/river/XwaylandView.zig
@@ -115,7 +115,7 @@ pub fn surfaceAt(self: Self, ox: f64, oy: f64, sx: *f64, sy: *f64) ?*c.wlr_surfa
 
 /// Get the current title of the xwayland surface. May be an empty string
 pub fn getTitle(self: Self) [*:0]const u8 {
-    return self.wlr_xwayland_surface.title;
+    return self.wlr_xwayland_surface.title orelse "";
 }
 
 /// Called when the xwayland surface is destroyed