src/video/x11/SDL_x11mouse.c
changeset 7071 82f17e656125
parent 6885 700f1b25f77f
child 7191 75360622e65f
equal deleted inserted replaced
7070:65df21723f58 7071:82f17e656125
   127     int x, y;
   127     int x, y;
   128     unsigned int rfg, gfg, bfg, rbg, gbg, bbg, fgBits, bgBits;
   128     unsigned int rfg, gfg, bfg, rbg, gbg, bbg, fgBits, bgBits;
   129     unsigned int width_bytes = ((surface->w + 7) & ~7) / 8;
   129     unsigned int width_bytes = ((surface->w + 7) & ~7) / 8;
   130 
   130 
   131     data_bits = SDL_calloc(1, surface->h * width_bytes);
   131     data_bits = SDL_calloc(1, surface->h * width_bytes);
       
   132     if (!data_bits) {
       
   133         SDL_OutOfMemory();
       
   134         return None;
       
   135     }
       
   136 
   132     mask_bits = SDL_calloc(1, surface->h * width_bytes);
   137     mask_bits = SDL_calloc(1, surface->h * width_bytes);
   133     if (!data_bits || !mask_bits) {
   138     if (!mask_bits) {
       
   139         SDL_free(data_bits);
   134         SDL_OutOfMemory();
   140         SDL_OutOfMemory();
   135         return None;
   141         return None;
   136     }
   142     }
   137 
   143 
   138     /* Code below assumes ARGB pixel format */
   144     /* Code below assumes ARGB pixel format */