fix crash bug.
Change-Id: I1afbc75815ffc72508942b73e40f67307f330ddf
This commit is contained in:
parent
7905c80940
commit
fb3bd71038
@ -423,8 +423,7 @@ int format_unknown_device(const char *device, const char* path, const char *fs_t
|
||||
{
|
||||
LOGI("Formatting unknown device.\n");
|
||||
|
||||
// device may simply be a name, like "system"
|
||||
if (get_flash_type(fs_type) != UNSUPPORTED)
|
||||
if (fs_type != NULL && get_flash_type(fs_type) != UNSUPPORTED)
|
||||
return erase_raw_partition(fs_type, device);
|
||||
|
||||
// if this is SDEXT:, don't worry about it if it does not exist.
|
||||
|
Loading…
Reference in New Issue
Block a user