[python] matplotlib: fix modpyplot_gc_collect

This commit is contained in:
Émilie Feral
2020-03-23 18:16:54 +01:00
parent 886fc98350
commit 24cd5079d4

View File

@@ -37,11 +37,11 @@ mp_obj_t modpyplot___init__() {
}
void modpyplot_gc_collect() {
if (sPlotStore != nullptr) {
if (sPlotStore == nullptr) {
return;
}
MicroPython::collectRootsAtAddress(
reinterpret_cast<char *>(&sPlotStore),
reinterpret_cast<char *>(sPlotStore),
sizeof(Matplotlib::PlotStore)
);
}