rocksndiamonds-3.1.0
[rocksndiamonds.git] / src / libgame / x11.c
index 2a21abcc89af91b55eb78c2c134cb0d1042bb5d6..6d5cb0a9ffe513e25af43487da2dad744eb53aff 100644 (file)
@@ -425,12 +425,14 @@ inline Pixel X11GetPixelFromRGB(unsigned int color_r, unsigned int color_g,
 
 inline void X11DestroyImage(XImage *ximage)
 {
+#if defined(TARGET_X11_NATIVE)
   /* this seems to be needed for OS/2, but does not hurt on other platforms */
   if (ximage->data != NULL)
   {
     free(ximage->data);
     ximage->data = NULL;
   }
+#endif /* TARGET_X11_NATIVE */
 
   XDestroyImage(ximage);
 }