mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +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
|
|
@ -120,12 +120,19 @@ void gui_printtext_internal(int xpos, int ypos, const char *str)
|
|||
next_xpos = next_ypos = -1;
|
||||
}
|
||||
|
||||
static void view_add_eol(TEXT_BUFFER_VIEW_REC *view, LINE_REC **line);
|
||||
|
||||
void gui_printtext_after_time(TEXT_DEST_REC *dest, LINE_REC *prev, const char *str, time_t time)
|
||||
{
|
||||
GUI_WINDOW_REC *gui;
|
||||
|
||||
gui = WINDOW_GUI(dest->window);
|
||||
|
||||
if (prev == NULL && !gui->view->buffer->last_eol) {
|
||||
/* we have an unfinished line in the buffer still */
|
||||
view_add_eol(gui->view, &gui->insert_after);
|
||||
}
|
||||
|
||||
gui->use_insert_after = TRUE;
|
||||
gui->insert_after = prev;
|
||||
gui->insert_after_time = time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue