bugfix: When we free the pixmap, clear any user data set on the resource

This was a cause of some memleaks/crashes in the wayland compositor
because the compositor was trying to access properties of the E_Pixmap
after it had already been freed. By setting the user_data to NULL, the
functions in the compositor which were failing will now stop trying to
access the pixmap after it's been freed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
devs/devilhorns/e_comp_wl
Chris Michael 9 years ago
parent 9488fddc59
commit b41dbbe9cf
  1. 2
      src/bin/e_pixmap.c

@ -97,7 +97,7 @@ _e_pixmap_free(E_Pixmap *cp)
break;
case E_PIXMAP_TYPE_WL:
#if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
/* NB: No-Op. Nothing to free. image data no longer memcpy'd */
if (cp->resource) wl_resource_set_user_data(cp->resource, NULL);
#endif
break;
default:

Loading…
Cancel
Save