Erich Hoover ehoover@mines.edu writes:
- /* Build an X cursor out of all of the frames */
- if (!(images = pXcursorImagesCreate( nFrames ))) goto cleanup;
- for (images->nimage = 0; images->nimage < nFrames; images->nimage++)
wine_tsx11_lock();images->images[images->nimage] = imgs[images->nimage];
- cursor = pXcursorImageLoadCursor( gdi_display, image );
- pXcursorImageDestroy( image );
- cursor = pXcursorImagesLoadCursor( gdi_display, images ); wine_tsx11_unlock();
- pXcursorImagesDestroy( images ); /* Note: XcursorImagesDestroy is called on each frame */
The note isn't clear, does it destroy the individual images or not? Either way your cleanup code needs more work.
+cleanup:
- /* Cleanup all of the resources used to obtain the frame data */
- if (imgs && !cursor)
- {
int i;
for (i = 0; i < nFrames; i++)
pXcursorImageDestroy( image );
And this can't possibly work.