X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0240e8b1aa935d43689b0b8ec36de3c06c1a4758..bada28f00f12666ef31f0543cea2cde86b7935c7:/src/mac/xpm/simx.c diff --git a/src/mac/xpm/simx.c b/src/mac/xpm/simx.c index eac5bd39bd..48dc21b037 100644 --- a/src/mac/xpm/simx.c +++ b/src/mac/xpm/simx.c @@ -35,7 +35,7 @@ #include "xpm.h" #include "xpmi.h" /* for XpmMalloc */ - +#include "rgbtab.h" #ifdef FOR_MSW /* @@ -310,6 +310,7 @@ XCreateImage(Display *d, Visual *v, rect.bottom = height ; NewGWorld( &img->gworldptr , depth , &rect , NULL , NULL , 0 ) ; + LockPixels( GetGWorldPixMap( img->gworldptr ) ) ; if (img->gworldptr == NULL) { XDestroyImage (img); @@ -347,7 +348,10 @@ XDestroyImage(XImage *img) DeleteObject(img->bitmap); /* check return ??? */ #elif macintosh if ( img->gworldptr ) + { + UnlockPixels( GetGWorldPixMap( img->gworldptr ) ) ; DisposeGWorld( img->gworldptr ) ; + } #endif XImageFree(img); }