Skip to content

Commit bdba40f

Browse files
committed
Update esp3dlib.cpp
1 parent 73e4bd3 commit bdba40f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/esp3dlib.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ void Esp3DLib::idletask() {
106106
ESP3DLIB_RUNNING_CORE /* Core to run the task */
107107
);
108108
#ifdef DISABLE_WDT_ESP3DLIB_TASK
109-
esp_task_wdt_delete(ESP3DHal::xHandle);
109+
if (esp_task_wdt_status(NULL) == ESP_OK) {
110+
esp_task_wdt_delete(ESP3DHal::xHandle);
111+
}
110112
#endif // DISABLE_WDT_ESP3DLIB_TASK
111113
}
112114
}

0 commit comments

Comments
 (0)