Commit 5930ef22 authored by Jean-Paul Saman's avatar Jean-Paul Saman

xvba_video_glx.c: split check for if-clause

The boolean operator || requires an evaluation of both expressions.
If the expressions evaluates pointers, then care must be taken that
both expressions have valid pointer. In this case it cannot be guaranteed,
thus splitting the check is needed.
parent 515c1a0d
...@@ -286,10 +286,13 @@ static void destroy_hw_image_glx( ...@@ -286,10 +286,13 @@ static void destroy_hw_image_glx(
{ {
unsigned int i; unsigned int i;
if (!obj_image || !obj_image->hw.glx) if (!obj_image)
return;
if (!obj_image->hw.glx)
return; return;
object_image_glx_p const hwi = obj_image->hw.glx; object_image_glx_p const hwi = obj_image->hw.glx;
ASSERT(hwi);
if (hwi->num_textures > 0) { if (hwi->num_textures > 0) {
glDeleteTextures(hwi->num_textures, hwi->textures); glDeleteTextures(hwi->num_textures, hwi->textures);
...@@ -430,9 +433,9 @@ commit_hw_image_glx( ...@@ -430,9 +433,9 @@ commit_hw_image_glx(
} }
const HWImageHooks hw_image_hooks_glx = { const HWImageHooks hw_image_hooks_glx = {
create_hw_image_glx, .create = create_hw_image_glx,
destroy_hw_image_glx, .destroy = destroy_hw_image_glx,
commit_hw_image_glx .commit = commit_hw_image_glx
}; };
// Render subpictures // Render subpictures
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment