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>
This commit is contained in:
Chris Michael 2014-09-10 09:48:17 -04:00
parent 9488fddc59
commit b41dbbe9cf
1 changed files with 1 additions and 1 deletions

View File

@ -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: