comparison libvo/vo_directx.c @ 32537:8fa2f43cb760

Remove most of the NULL pointer check before free all over the code
author cboesch
date Sun, 14 Nov 2010 09:12:34 +0000
parents 983577adcf0e
children 899d817e56fc
comparison
equal deleted inserted replaced
32536:187f26cba0ce 32537:8fa2f43cb760
1180 if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT , NULL) == DD_OK) { 1180 if (g_lpddsBack->lpVtbl->Lock(g_lpddsBack,NULL,&ddsdsf, DDLOCK_NOSYSLOCK | DDLOCK_WAIT , NULL) == DD_OK) {
1181 if(vo_directrendering && (dstride != ddsdsf.lPitch)){ 1181 if(vo_directrendering && (dstride != ddsdsf.lPitch)){
1182 mp_msg(MSGT_VO,MSGL_WARN,"<vo_directx><WARN>stride changed !!!! disabling direct rendering\n"); 1182 mp_msg(MSGT_VO,MSGL_WARN,"<vo_directx><WARN>stride changed !!!! disabling direct rendering\n");
1183 vo_directrendering=0; 1183 vo_directrendering=0;
1184 } 1184 }
1185 if (tmp_image) 1185 free(tmp_image);
1186 free(tmp_image);
1187 tmp_image = NULL; 1186 tmp_image = NULL;
1188 dstride = ddsdsf.lPitch; 1187 dstride = ddsdsf.lPitch;
1189 image = ddsdsf.lpSurface; 1188 image = ddsdsf.lpSurface;
1190 } else if (!tmp_image) { 1189 } else if (!tmp_image) {
1191 mp_msg(MSGT_VO, MSGL_WARN, "<vo_directx><WARN>Locking the surface failed, rendering to a hidden surface!\n"); 1190 mp_msg(MSGT_VO, MSGL_WARN, "<vo_directx><WARN>Locking the surface failed, rendering to a hidden surface!\n");