diff options
| author | Randy Palamar <palamar@ualberta.ca> | 2023-07-03 00:35:29 -0600 |
|---|---|---|
| committer | Randy Palamar <palamar@ualberta.ca> | 2023-07-18 21:20:40 -0600 |
| commit | 47ac03a911eff0f743d1ee45efc51fc8f68dcbb8 (patch) | |
| tree | 94a82cef5330cde19f485419ed376b81a3cdc2d9 /lua/lexers/caml.lua | |
| parent | 80fbb7e1ead4d16f1f4d511d30df18eeb65ceafa (diff) | |
| download | vis-47ac03a911eff0f743d1ee45efc51fc8f68dcbb8.tar.gz vis-47ac03a911eff0f743d1ee45efc51fc8f68dcbb8.tar.xz | |
vis:pipe(): don't segfault if vis->win isn't present
When `file` was made optional the variable was changed to be initialized
by `vis->win->file` instead of a known safe file pointer. If `vis:pipe()`
is called based on the event `FILE_OPEN` the `file` parameter can be
valid even when `vis->win` is not yet present. Assuming `file` was
provided this would be handled later on if vis didn't segfault. By
initializing to NULL when `vis->win` isn't present `file` is given
a chance be handled later. In the case where `file` wasn't given and
`vis->win` is missing an error is thrown and `vis:pipe()` exits.
fixes #1107 - Lua API: vis:pipe() causes a segfault when called before
a window is open
Diffstat (limited to 'lua/lexers/caml.lua')
0 files changed, 0 insertions, 0 deletions
