VIDEO: Fix coverity identified memory allocation failure error check

This commit is contained in:
Mark Pizzolato 2019-07-05 09:59:08 -07:00
parent 9e71982249
commit 24ed486222

View file

@ -2159,7 +2159,7 @@ if (!vid_active) {
return SCPE_UDIS | SCPE_NOMESSAGE;
}
fullname = (char *)malloc (strlen(filename) + 5);
if (!filename)
if (!fullname)
return SCPE_MEM;
#if SDL_MAJOR_VERSION == 1
#if defined(HAVE_LIBPNG)