Fix NULL pointer dereference in glx_init_blur
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
a0739b7d86
commit
543bbe6a39
|
@ -563,12 +563,16 @@ glx_init_blur(session_t *ps) {
|
||||||
"texture2DRect": "texture2D");
|
"texture2DRect": "texture2D");
|
||||||
const char *shader_add = FRAG_SHADER_BLUR_ADD;
|
const char *shader_add = FRAG_SHADER_BLUR_ADD;
|
||||||
char *extension = NULL;
|
char *extension = NULL;
|
||||||
if (use_texture_rect)
|
if (use_texture_rect) {
|
||||||
mstrextend(&extension, "#extension GL_ARB_texture_rectangle : require\n");
|
mstrextend(&extension, "#extension GL_ARB_texture_rectangle : require\n");
|
||||||
|
}
|
||||||
if (ps->o.glx_use_gpushader4) {
|
if (ps->o.glx_use_gpushader4) {
|
||||||
mstrextend(&extension, "#extension GL_EXT_gpu_shader4 : require\n");
|
mstrextend(&extension, "#extension GL_EXT_gpu_shader4 : require\n");
|
||||||
shader_add = FRAG_SHADER_BLUR_ADD_GPUSHADER4;
|
shader_add = FRAG_SHADER_BLUR_ADD_GPUSHADER4;
|
||||||
}
|
}
|
||||||
|
if (!extension) {
|
||||||
|
extension = strdup("");
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < MAX_BLUR_PASS && ps->o.blur_kerns[i]; ++i) {
|
for (int i = 0; i < MAX_BLUR_PASS && ps->o.blur_kerns[i]; ++i) {
|
||||||
xcb_render_fixed_t *kern = ps->o.blur_kerns[i];
|
xcb_render_fixed_t *kern = ps->o.blur_kerns[i];
|
||||||
|
|
Loading…
Reference in New Issue