Fix null pointer dereference

This commit is contained in:
MX 2023-04-21 07:51:37 +03:00
parent f0e866cb56
commit 7747f45be3
No known key found for this signature in database
GPG key ID: 7CCC66B7DBDD1C83

View file

@ -59,8 +59,8 @@ void subghz_scene_save_name_on_enter(void* context) {
if(!subghz_path_is_file(subghz->file_path)) {
char file_name_buf[SUBGHZ_MAX_LEN_NAME] = {0};
if(furi_hal_subghz_get_timestamp_file_names()) {
if(subghz->txrx->decoder_result->protocol->name != 0x0) {
if(subghz->txrx->decoder_result->protocol->name != NULL) {
if(subghz->txrx->decoder_result != 0x0) {
if(subghz->txrx->decoder_result != NULL) {
if(strlen(subghz->txrx->decoder_result->protocol->name) != 0) {
if(strcmp(subghz->txrx->decoder_result->protocol->name, "BinRAW") == 0) {
subghz_scene_save_name_get_timefilename(file_name, "S", true);