mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
XDestroyImage uses free() so we must malloc() it's data
This commit is contained in:
parent
bd107c4007
commit
4b3ae53570
@ -21,6 +21,7 @@
|
||||
#include <FL/x.h>
|
||||
|
||||
#include <string.h> // memcpy
|
||||
#include <stdlib.h> // malloc
|
||||
|
||||
#define CALC_PIXEL(tmp, rshift, rmask, gshift, gmask, bshift, bmask) \
|
||||
tmp = 0; \
|
||||
@ -115,7 +116,7 @@ Pixmap create_xpixmap(Fl_Image* img, XImage*& xim, Pixmap pix, int wp_w, int wp_
|
||||
msb = false;
|
||||
|
||||
unsigned int r, g, b, tmp;
|
||||
unsigned char* dest = new unsigned char[iw * ih * id];
|
||||
unsigned char* dest = (unsigned char*)malloc(sizeof(unsigned char) * iw * ih * id);
|
||||
unsigned char* destptr = dest;
|
||||
unsigned char* src = (unsigned char*)img->data()[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user