src/video/SDL_video.c
changeset 4433 9fa97c6b0014
parent 3701 fb905d5674cc
child 4472 791b3256fb22
child 4701 d40bb3165d2b
child 4772 37e9f8154ac4
equal deleted inserted replaced
4432:77ebcd41b577 4433:9fa97c6b0014
  1647     }
  1647     }
  1648     if (!renderer->CreateTexture) {
  1648     if (!renderer->CreateTexture) {
  1649         SDL_Unsupported();
  1649         SDL_Unsupported();
  1650         return 0;
  1650         return 0;
  1651     }
  1651     }
       
  1652     if (w <= 0 || h <= 0) {
       
  1653         SDL_SetError("Texture dimensions can't be 0");
       
  1654         return 0;
       
  1655     }
  1652     texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture));
  1656     texture = (SDL_Texture *) SDL_calloc(1, sizeof(*texture));
  1653     if (!texture) {
  1657     if (!texture) {
  1654         SDL_OutOfMemory();
  1658         SDL_OutOfMemory();
  1655         return 0;
  1659         return 0;
  1656     }
  1660     }