diff --git a/src/conio/x_events.c b/src/conio/x_events.c
index 28bc6de127f95be266c496adf5be78bf66ec9231..9061eed5e49b6706bd75cc2c7eb135be7b07f28c 100644
--- a/src/conio/x_events.c
+++ b/src/conio/x_events.c
@@ -428,7 +428,7 @@ set_icon(const void *data, size_t width, XWMHints *hints)
 	unsigned short tmp;
 	XColor fg;
 	bool sethints = (hints == NULL);
-	unsigned long lasti, lastim;
+	unsigned long lasti = ULONG_MAX, lastim = ULONG_MAX;
 
 	// This is literally the wost possible way to create a pixmap. :)
 	/*