From fb3bd71038a3795aed603146b55effc38cf41cee Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Thu, 16 Jun 2011 14:13:02 -0700 Subject: [PATCH] fix crash bug. Change-Id: I1afbc75815ffc72508942b73e40f67307f330ddf --- extendedcommands.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extendedcommands.c b/extendedcommands.c index 64c4e3d..c2a0e18 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -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.