mirror of
https://github.com/zoriya/ash.git
synced 2026-05-30 01:37:08 +00:00
Solving a segfault with the newline_command when no window was openned
This commit is contained in:
@@ -69,7 +69,8 @@ int newline_command(int key, buffer_t *buffer, env_t *env)
|
||||
my_nresume(env->window);
|
||||
buffer->buffer[0] = '\0';
|
||||
buffer->pos = 0;
|
||||
my_getcuryx(&env->window->y, &env->window->x);
|
||||
if (env->window)
|
||||
my_getcuryx(&env->window->y, &env->window->x);
|
||||
}
|
||||
if (env->window && ret >= 0)
|
||||
prompt_prepare(buffer, env);
|
||||
|
||||
Reference in New Issue
Block a user