From 44a8f52425c03c6ad6bb24561d1ae738458fa8f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Mon, 6 Jan 2025 19:16:48 -0500
Subject: [PATCH] Handle case where we receive a MapNotify without a
 ConfigureNotify first

This shouldn't happen, but it does!
---
 src/conio/x_events.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conio/x_events.c b/src/conio/x_events.c
index 104fa93926..5b27131904 100644
--- a/src/conio/x_events.c
+++ b/src/conio/x_events.c
@@ -1789,7 +1789,8 @@ x11_event(XEvent *ev)
 		case MapNotify:
 			if (map_pending) {
 				map_pending = false;
-				handle_configuration(pending_width, pending_height, true, true);
+				if (pending_width && pending_height)
+					handle_configuration(pending_width, pending_height, true, true);
 			}
 			break;
 		case NoExpose:
-- 
GitLab