Browse code

Unit tests don't have fmap.

Don't crash unit tests.

Török Edvin authored on 2010/03/10 21:58:18
Showing 1 changed files
... ...
@@ -1871,6 +1871,8 @@ static int cli_scanraw(cli_ctx *ctx, cli_file_t type, uint8_t typercg, cli_file_
1871 1871
 
1872 1872
 static void emax_reached(cli_ctx *ctx) {
1873 1873
     fmap_t **ctx_fmap = ctx->fmap;
1874
+    if (!ctx_fmap)
1875
+	return;
1874 1876
     while(*ctx_fmap) {
1875 1877
 	fmap_t *map = *ctx_fmap;
1876 1878
 	map->dont_cache_flag = 1;