Skip to content

Commit c9ddb74

Browse files
authored
fix: clear _gt911TouchHandler value when no function given
1 parent 4650956 commit c9ddb74

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Arduino_GigaDisplayTouch.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ uint8_t Arduino_GigaDisplayTouch::getTouchPoints(GDTpoint_t* points) {
173173
void Arduino_GigaDisplayTouch::onDetect(void (*handler)(uint8_t, GDTpoint_t*)) {
174174
if (handler == nullptr) {
175175
// Detach the interrupt and stop the event queue thread
176+
_gt911TouchHandler = nullptr;
176177
queue.break_dispatch();
177178
_irqInt.rise(nullptr);
178179
if (t.get_state() != rtos::Thread::Deleted) {

0 commit comments

Comments
 (0)