Fix crash in f-typeprint.c
I noticed a crash in f-typeprint.c that was hidden by an xfail:
XFAIL: gdb.fortran/vla-array.exp: print variable length string array type (GDB internal error) (PRMS gcc/101826)
I think this was introduced by commit 6594ca4a ("do not handle a NULL
linebuffer in pager_file::puts") but not detected due to the xfail.
It seems bad for an xfail to cover up a crash but I haven't
investigated that.
Meanwhile, this patch fixes the crash by checking for a NULL pointer
when calling gdb_puts.
Approved-by: Kevin Buettner <kevinb@redhat.com>
1 file changed