diff --git a/src/view-backend-exportable-fdo-egl.cpp b/src/view-backend-exportable-fdo-egl.cpp index fa0986c..0031222 100644 --- a/src/view-backend-exportable-fdo-egl.cpp +++ b/src/view-backend-exportable-fdo-egl.cpp @@ -265,9 +265,11 @@ class ClientBundleEGL final : public ClientBundle { private: struct wpe_fdo_egl_exported_image* findImage(struct wl_resource* bufferResource) { - if (auto* listener = wl_resource_get_destroy_listener(bufferResource, bufferDestroyListenerCallback)) { - struct wpe_fdo_egl_exported_image* image; - return wl_container_of(listener, image, bufferDestroyListener); + if (bufferResource) { + if (auto* listener = wl_resource_get_destroy_listener(bufferResource, bufferDestroyListenerCallback)) { + struct wpe_fdo_egl_exported_image* image; + return wl_container_of(listener, image, bufferDestroyListener); + } } return nullptr;