summaryrefslogtreecommitdiffstats
path: root/src/simfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/simfs.c')
-rw-r--r--src/simfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/simfs.c b/src/simfs.c
index 6865230d..0b554868 100644
--- a/src/simfs.c
+++ b/src/simfs.c
@@ -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));