mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 03:40:16 +02:00
fix a crash when trying to append to a NULL line
reported by @vague666
This commit is contained in:
parent
65a139aa9e
commit
c7ca8102c0
2 changed files with 11 additions and 1 deletions
|
|
@ -913,11 +913,14 @@ void textbuffer_view_resize(TEXT_BUFFER_VIEW_REC *view, int width, int height)
|
|||
} else if (view->startline == view->bottom_startline &&
|
||||
view->subline > view->bottom_subline) {
|
||||
view->subline = view->bottom_subline;
|
||||
} else {
|
||||
} else if (view->startline != NULL) {
|
||||
/* make sure the subline is still in allowed range */
|
||||
linecount = view_get_linecount(view, view->startline);
|
||||
if (view->subline > linecount)
|
||||
view->subline = linecount;
|
||||
} else {
|
||||
/* we don't have a startline. still under construction? */
|
||||
view->subline = 0;
|
||||
}
|
||||
|
||||
textbuffer_view_init_ypos(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue