From 24cd5079d45059c14dc266d71f673723cc162b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 23 Mar 2020 18:16:54 +0100 Subject: [PATCH] [python] matplotlib: fix modpyplot_gc_collect --- python/port/mod/matplotlib/modpyplot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/port/mod/matplotlib/modpyplot.cpp b/python/port/mod/matplotlib/modpyplot.cpp index 81972335e..3ab8682bd 100644 --- a/python/port/mod/matplotlib/modpyplot.cpp +++ b/python/port/mod/matplotlib/modpyplot.cpp @@ -37,11 +37,11 @@ mp_obj_t modpyplot___init__() { } void modpyplot_gc_collect() { - if (sPlotStore != nullptr) { + if (sPlotStore == nullptr) { return; } MicroPython::collectRootsAtAddress( - reinterpret_cast(&sPlotStore), + reinterpret_cast(sPlotStore), sizeof(Matplotlib::PlotStore) ); }