Skip to content

Commit b99b821

Browse files
committed
set custom console null check (fixes #224)
1 parent cf532c4 commit b99b821

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/MicroOcpp/Platform.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ void MicroOcpp::mocpp_console_out(const char *msg) {
1818

1919
void mocpp_set_console_out(void (*console_out)(const char *msg)) {
2020
MicroOcpp::mocpp_console_out_impl = console_out;
21-
console_out("[OCPP] console initialized\n");
21+
if (console_out) {
22+
console_out("[OCPP] console initialized\n");
23+
}
2224
}
2325

2426
#endif

0 commit comments

Comments
 (0)