Commit e86df020 authored by Michael Niedermayer's avatar Michael Niedermayer

avdevice/xcbgrab: check xcb_query_pointer_reply_t pointer before use

Fixes CID1254668
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 754f4957
......@@ -106,12 +106,17 @@ static int xcbgrab_reposition(AVFormatContext *s,
xcb_get_geometry_reply_t *geo)
{
XCBGrabContext *c = s->priv_data;
int x = c->x, y = c->y, p_x = p->win_x, p_y = p->win_y;
int x, y, p_x, p_y;
int w = c->width, h = c->height, f = c->follow_mouse;
if (!p || !geo)
return AVERROR(EIO);
x = c->x;
y = c->y;
p_x = p->win_x;
p_y = p->win_y;
if (f == FOLLOW_CENTER) {
x = p_x - w / 2;
y = p_y - h / 2;
......
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