xwayland: don't crash on null title

This commit is contained in:
Isaac Freund 2020-07-06 16:10:59 +02:00
parent 014963612c
commit dfe61fe77d
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

View File

@ -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 /// Get the current title of the xwayland surface. May be an empty string
pub fn getTitle(self: Self) [*:0]const u8 { 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 /// Called when the xwayland surface is destroyed