(D3D) Use C-style allocation for d3d->menu

This commit is contained in:
twinaphex 2017-04-23 09:38:26 +02:00
parent 7afc83518d
commit a88284897b

View File

@ -987,7 +987,7 @@ static bool d3d_construct(d3d_video_t *d3d,
d3d->should_resize = false;
#if defined(HAVE_MENU)
d3d->menu = new overlay_t();
d3d->menu = (overlay_t*)calloc(1, sizeof(*d3d->menu));
if (!d3d->menu)
return false;
@ -1224,7 +1224,8 @@ static void d3d_free(void *data)
#ifdef HAVE_MENU
d3d_free_overlay(d3d, d3d->menu);
if (d3d->menu)
delete d3d->menu;
free(d3d->menu);
d3d->menu = NULL;
#endif
#endif