Skip to content

Commit f48c1a9

Browse files
authored
Merge pull request #9344 from Pharap/fix-attach-function
Fix bug in templated attach function
2 parents 6c6ebc6 + b6aba2f commit f48c1a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/unsupported/USBDevice/USBSerial/USBSerial.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ class USBSerial: public USBCDC, public Stream {
126126
*/
127127
template<typename T>
128128
void attach(T* tptr, void (T::*mptr)(void)) {
129-
if((mptr != NULL) && (tptr != NULL)) {
130-
rx = Callback<void()>(mptr, tptr);
129+
if((tptr != NULL) && (mptr != NULL)) {
130+
rx = Callback<void()>(tptr, mptr);
131131
}
132132
}
133133

0 commit comments

Comments
 (0)