Skip to content

Commit d198eec

Browse files
author
Teppo Järvelin
committed
Fixed crash bug in dot_event() where interface could have been called before interface was created.
Fixed crash in dot printing thread when iface was not created but referenced.
1 parent dc3c0da commit d198eec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ void dot_event()
106106
{
107107
while (true) {
108108
Thread::wait(4000);
109-
if (!iface->is_connected()) {
109+
if (iface && iface->is_connected()) {
110+
break;
111+
} else {
110112
trace_mutex.lock();
111113
printf(".");
112114
fflush(stdout);
113115
trace_mutex.unlock();
114-
} else {
115-
break;
116116
}
117117
}
118118
}

0 commit comments

Comments
 (0)