If we cannot create the data_offer resource, then cleanup and exit

nicely.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-11-05 08:05:07 +00:00
parent 19281cfd47
commit 566b27d15e
1 changed files with 6 additions and 0 deletions

View File

@ -793,6 +793,12 @@ wl_data_source_send_offer(struct wl_data_source *source, struct wl_resource *tar
offer->resource =
wl_resource_create(wl_resource_get_client(target),
&wl_data_offer_interface, 1, 0);
if (!offer->resource)
{
free(offer);
return NULL;
}
wl_resource_set_implementation(offer->resource, &_e_data_offer_interface,
offer, _destroy_data_offer);