vo_opengl: free to-be-added hook on hook array overflow

Seems sensible.

Untested.
This commit is contained in:
wm4 committed 2016-05-16 12:51:36 +02:00
1 parent 155857dbe6
commit 70df6aa375
1 file changed
+3
+3
View File
@@ -1546,6 +1546,9 @@ static void pass_add_hook(struct gl_video *p, struct tex_hook hook)
p->tex_hooks[p->tex_hook_num++] = hook;
} else {
MP_ERR(p, "Too many hooks! Limit is %d.\n", MAX_TEXTURE_HOOKS);
if (hook.free)
hook.free(&hook);
}
}