patch 9.0.1199: crash when using kitty and using a mapping with <Esc>

Problem:    Crash when using kitty and using a mapping with <Esc>.
Solution:   Do not try setting did_simplify when it is NULL. (closes #11817)
diff --git a/src/misc2.c b/src/misc2.c
index 87b1a15..e3602ee 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1498,6 +1498,7 @@
 			key = DEL;
 		}
 		else if (key == 27
+			&& (flags & FSK_FROM_PART) != 0
 			&& (kitty_protocol_state == KKPS_ENABLED
 			    || kitty_protocol_state == KKPS_DISABLED))
 		{
@@ -1506,7 +1507,10 @@
 		    // character and set did_simplify, then in the
 		    // non-simplified keys use K_ESC.
 		    if ((flags & FSK_SIMPLIFY) != 0)
-			*did_simplify = TRUE;
+		    {
+			if (did_simplify != NULL)
+			    *did_simplify = TRUE;
+		    }
 		    else
 			key = K_ESC;
 		}