simfs: Don't try to read image cache imsi is null

This commit is contained in:
Denis Kenzior 2010-10-11 20:13:08 -05:00
parent 413c200dfb
commit f4c66f67df
1 changed files with 3 additions and 1 deletions

View File

@ -756,8 +756,10 @@ char *sim_fs_get_cached_image(struct sim_fs *fs, int id)
return NULL;
imsi = ofono_sim_get_imsi(fs->sim);
phase = ofono_sim_get_phase(fs->sim);
if (imsi == NULL)
return NULL;
phase = ofono_sim_get_phase(fs->sim);
path = g_strdup_printf(SIM_IMAGE_CACHE_PATH, imsi, phase, id);
TFR(stat(path, &st_buf));