Commit Diff


commit - 273db5ceaf392e68c2faf8f7dec14ea2e25e980d
commit + a0467c802d4f86ed162486e3453dd61181423902
blob - 6783c2b46cc51495e4e02e9079fefd41e7223155
blob + de2dd0ec88c489ac332b223fdef10923198c62d0
--- st.c
+++ st.c
@@ -1960,10 +1960,10 @@ strhandle(void)
 				break;
 			p = strescseq.args[2];
 			/* FALLTHROUGH */
-		case 104: /* color reset, here p = NULL */
+		case 104: /* color reset */
 			j = (narg > 1) ? atoi(strescseq.args[1]) : -1;
 
-			if (!strcmp(p, "?"))
+			if (p && !strcmp(p, "?"))
 				osc4_color_response(j);
 			else if (xsetcolorname(j, p)) {
 				if (par == 104 && narg <= 1)