fix CID 1238659: Dereference after null check (FORWARD_NULL)

This commit is contained in:
Boris Faure 2014-09-15 21:04:26 +02:00
parent 9fff679f97
commit 90c53f5974
1 changed files with 2 additions and 2 deletions

View File

@ -639,9 +639,9 @@ termpty_line_find_top(Termpty *ty, int y_end, int *top)
if (ts)
{
ts = termpty_save_extract(ts);
if (!ts)
return -1;
}
if (!ts)
return -1;
ty->back[(y_start + ty->backpos - 1 + ty->backmax) % ty->backmax] = ts;
if (ts->cell[ts->w - 1].att.autowrapped)
y_start--;