Browse Source

Storage: fixed internal info if name is null (#631)

SG 4 years ago
parent
commit
c799fcf416

+ 1 - 1
applications/storage-settings/scenes/storage-settings-scene-internal-info.c

@@ -28,7 +28,7 @@ void storage_settings_scene_internal_info_on_enter(void* context) {
         string_printf(
             app->text_string,
             "Label: %s\nType: LittleFS\n%lu KB total\n%lu KB free",
-            furi_hal_version_get_name_ptr(),
+            furi_hal_version_get_name_ptr() ? furi_hal_version_get_name_ptr() : "Unknown",
             (uint32_t)(total_space / 1024),
             (uint32_t)(free_space / 1024));
         dialog_ex_set_text(

+ 1 - 1
applications/storage/storage-cli.c

@@ -64,7 +64,7 @@ void storage_cli_info(Cli* cli, string_t path) {
         } else {
             printf(
                 "Label: %s\r\nType: LittleFS\r\n%lu KB total\r\n%lu KB free\r\n",
-                furi_hal_version_get_name_ptr(),
+                furi_hal_version_get_name_ptr() ? furi_hal_version_get_name_ptr() : "Unknown",
                 (uint32_t)(total_space / 1024),
                 (uint32_t)(free_space / 1024));
         }