diff --git a/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp b/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp index b3966a0e..e5f013b6 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowAlignment.cpp @@ -210,12 +210,10 @@ bool ClassFlowAlignment::doFlow(string time) ImageTMP->SaveToFile(FormatFileName("/sdcard/img_tmp/alg_roi.jpg")); } - if (ImageTMP) // must be deleted to have memory space for loading tflite - { - delete ImageTMP; - ImageTMP = NULL; - } - + // must be deleted to have memory space for loading tflite + delete ImageTMP; + ImageTMP = NULL; + LoadReferenceAlignmentValues(); return true;