diff --git a/gfx/drivers/ps2_gfx.c b/gfx/drivers/ps2_gfx.c index 45f67c28c8..a25c9c8239 100644 --- a/gfx/drivers/ps2_gfx.c +++ b/gfx/drivers/ps2_gfx.c @@ -66,10 +66,7 @@ static GSGLOBAL *init_GSGlobal(void) { } static GSTEXTURE * prepare_new_texture(void) { - GSTEXTURE *texture = malloc(sizeof *texture); - texture->Width = 0; - texture->Height = 0; - texture->Mem = NULL; + GSTEXTURE *texture = calloc(1, sizeof(*texture)); return texture; }