don't render unless we have a buffer

This commit is contained in:
Raphael Robatsch 2021-11-02 18:49:50 +01:00
parent 3be7cf1a76
commit 2f79dbd9fb

View File

@ -165,7 +165,8 @@ void Bar::layerSurfaceConfigure(uint32_t serial, uint32_t width, uint32_t height
void Bar::render() void Bar::render()
{ {
if (!visible()) return; if (!_bufs)
return;
auto img = wl_unique_ptr<cairo_surface_t> {cairo_image_surface_create_for_data( auto img = wl_unique_ptr<cairo_surface_t> {cairo_image_surface_create_for_data(
_bufs->data(), _bufs->data(),
CAIRO_FORMAT_ARGB32, CAIRO_FORMAT_ARGB32,