Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2026-05-24 10:00:06 +01:00
4 changed files with 7 additions and 7 deletions

View File

@@ -304,8 +304,7 @@ layout_parse(struct window *w, const char *layout, char **cause)
layout_print_cell(tiled_lc, __func__, 0); layout_print_cell(tiled_lc, __func__, 0);
/* Free the floating layout cell, no longer needed. */ /* Free the floating layout cell, no longer needed. */
if (floating_lc != NULL) layout_free_cell(floating_lc);
layout_free_cell(floating_lc);
notify_window("window-layout-changed", w); notify_window("window-layout-changed", w);

View File

@@ -78,6 +78,9 @@ layout_free_cell(struct layout_cell *lc)
{ {
struct layout_cell *lcchild; struct layout_cell *lcchild;
if (lc == NULL)
return;
switch (lc->type) { switch (lc->type) {
case LAYOUT_LEFTRIGHT: case LAYOUT_LEFTRIGHT:
case LAYOUT_TOPBOTTOM: case LAYOUT_TOPBOTTOM:

View File

@@ -1273,7 +1273,7 @@ screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
struct screen *s = wp->screen; struct screen *s = wp->screen;
struct colour_palette *palette = &wp->palette; struct colour_palette *palette = &wp->palette;
struct grid_cell defaults; struct grid_cell defaults;
u_int i, j, woy, wx, wy, px, py, width; u_int i, j, woy, wx, wy, py, width;
struct visible_ranges *r; struct visible_ranges *r;
struct visible_range *ri; struct visible_range *ri;

View File

@@ -347,10 +347,8 @@ window_destroy(struct window *w)
window_unzoom(w, 0); window_unzoom(w, 0);
RB_REMOVE(windows, &windows, w); RB_REMOVE(windows, &windows, w);
if (w->layout_root != NULL) layout_free_cell(w->layout_root);
layout_free_cell(w->layout_root); layout_free_cell(w->saved_layout_root);
if (w->saved_layout_root != NULL)
layout_free_cell(w->saved_layout_root);
free(w->old_layout); free(w->old_layout);
window_destroy_panes(w); window_destroy_panes(w);