summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/main.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-03-31 19:55:42 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-03-31 19:56:52 +0300
commit4b597a1c1a08b1895a3aeed60394872ff906abb7 (patch)
tree7cf5f0b641564383bcda0f77d29984bdcf070fde /esp8266/main.c
parent98af89161084eec240f26015b35397b547abcbf8 (diff)
downloadmicropython-4b597a1c1a08b1895a3aeed60394872ff906abb7.tar.gz
micropython-4b597a1c1a08b1895a3aeed60394872ff906abb7.zip
esp8266: Reset term_obj on reboot.
Also, term_obj can be NULL if socket enables REPL duplication signalling before os.dupterm is called, so it should be checked.
Diffstat (limited to 'esp8266/main.c')
-rw-r--r--esp8266/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/esp8266/main.c b/esp8266/main.c
index bf68ebc96d..bb282462fd 100644
--- a/esp8266/main.c
+++ b/esp8266/main.c
@@ -52,6 +52,7 @@ STATIC void mp_reset(void) {
memset(MP_STATE_PORT(fs_user_mount), 0, sizeof(MP_STATE_PORT(fs_user_mount)));
#endif
MP_STATE_PORT(mp_kbd_exception) = mp_obj_new_exception(&mp_type_KeyboardInterrupt);
+ MP_STATE_PORT(term_obj) = MP_OBJ_NULL;
#if MICROPY_MODULE_FROZEN
pyexec_frozen_module("boot");
#endif