about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/ui/window.c3
-rw-r--r--src/ui/window_list.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/window.c b/src/ui/window.c
index 39e6500d..2ebf7a31 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -748,6 +748,9 @@ win_refresh_with_subwin(ProfWin *window)
         subwin_cols = win_occpuants_cols();
     } else if (window->type == WIN_CONSOLE) {
         subwin_cols = win_roster_cols();
+    } else {
+        // Other window types don't support subwindows, we shouldn't be here
+        return;
     }
 
     pnoutrefresh(layout->base.win, layout->base.y_pos, 0, row_start, 0, row_end, (cols-subwin_cols)-1);
diff --git a/src/ui/window_list.c b/src/ui/window_list.c
index 0c139cb7..b1c01c41 100644
--- a/src/ui/window_list.c
+++ b/src/ui/window_list.c
@@ -743,8 +743,7 @@ wins_show_subwin(ProfWin *window)
     win_show_subwin(window);
 
     // only mucwin and console have occupants/roster subwin
-    if (window->type != WIN_MUC ||
-            window->type != WIN_CONSOLE) {
+    if (window->type != WIN_MUC && window->type != WIN_CONSOLE) {
         return;
     }