summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/obj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/obj.c b/py/obj.c
index c20b549a3..fb59eec82 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -488,6 +488,8 @@ mp_obj_t mp_obj_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t value) {
mp_obj_type_t *type = mp_obj_get_type(base);
if (type->subscr != NULL) {
mp_obj_t ret = type->subscr(base, index, value);
+ // May have called port specific C code. Make sure it didn't mess up the heap.
+ assert_heap_ok();
if (ret != MP_OBJ_NULL) {
return ret;
}