X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/c5608700e27349935d977d019177e2fb0a71ee59..4be845d676ee6fec74f785564faa7e2367a55543:/emufs/indice_b.c?ds=sidebyside diff --git a/emufs/indice_b.c b/emufs/indice_b.c index a964608..228ed2b 100644 --- a/emufs/indice_b.c +++ b/emufs/indice_b.c @@ -1283,10 +1283,13 @@ CLAVE emufs_indice_b_obtener_sig_clave(INDICE *idx, CLAVE k) */ nodo = b_leer_nodo(idx, claves[header.cant-1].hijo_derecho); free(tmp); - b_leer_header(nodo, &header); - claves = b_leer_claves(nodo, &header); + if (nodo != NULL) { + b_leer_header(nodo, &header); + claves = b_leer_claves(nodo, &header); - salida = claves[0].clave; + salida = claves[0].clave; + } else + salida.i_clave = -1; } return salida; }