Commit 8de0990e authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dvbsubdec: Check get_region() return value

Fixes null pointer dereference with DEBUG enabled
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent edf1cb7a
......@@ -1373,6 +1373,9 @@ static void save_display_set(DVBSubContext *ctx)
for (display = ctx->display_list; display; display = display->next) {
region = get_region(ctx, display->region_id);
if (!region)
return;
if (x_pos == -1) {
x_pos = display->x_pos;
y_pos = display->y_pos;
......@@ -1406,6 +1409,9 @@ static void save_display_set(DVBSubContext *ctx)
for (display = ctx->display_list; display; display = display->next) {
region = get_region(ctx, display->region_id);
if (!region)
return;
x_off = display->x_pos - x_pos;
y_off = display->y_pos - y_pos;
......
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