mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 22:40:25 +00:00
Handle furi_open() error
This commit is contained in:
parent
d39d2265e3
commit
449e905f46
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,9 @@ static ssize_t stdout_write(void *_cookie, const char *buf, size_t n) {
|
|||
FuriRecordSubscriber *log = pvTaskGetThreadLocalStoragePointer(NULL, 0);
|
||||
if (log == NULL) {
|
||||
log = furi_open("tty", false, false, NULL, NULL, NULL);
|
||||
if (log == NULL) {
|
||||
return -1;
|
||||
}
|
||||
vTaskSetThreadLocalStoragePointer(NULL, 0, log);
|
||||
}
|
||||
if (buf == 0) {
|
||||
|
|
Loading…
Reference in a new issue