Skip to content

Commit

Permalink
Fix SIGSEGV
Browse files Browse the repository at this point in the history
(cherry picked from commit 5ec233b)
  • Loading branch information
vieiraa authored and aperezdc committed Aug 9, 2022
1 parent 8b1ea4d commit 6f9eebf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/view-backend-exportable-fdo-egl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6f9eebf

Please sign in to comment.