mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
Fix of recent GCode / GCodeProcessor refactoring: Don't close a FILE
twice.
This commit is contained in:
@@ -350,7 +350,12 @@ void GCodeProcessor::TimeProcessor::reset()
|
||||
struct FilePtr {
|
||||
FilePtr(FILE *f) : f(f) {}
|
||||
~FilePtr() { this->close(); }
|
||||
void close() { if (f) ::fclose(f); }
|
||||
void close() {
|
||||
if (this->f) {
|
||||
::fclose(this->f);
|
||||
this->f = nullptr;
|
||||
}
|
||||
}
|
||||
FILE* f = nullptr;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user