From 5d20582ad06f7ba99695b6b52b8003689525173f Mon Sep 17 00:00:00 2001 From: crunchy Date: Sun, 13 Oct 2002 19:46:51 +0000 Subject: fixed crash + clean up --- mpiosh/readline.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mpiosh/readline.c') diff --git a/mpiosh/readline.c b/mpiosh/readline.c index 5427b9f..cbff0a9 100644 --- a/mpiosh/readline.c +++ b/mpiosh/readline.c @@ -2,7 +2,7 @@ * * Author: Andreas Büsching * - * $Id: readline.c,v 1.2 2002/10/12 20:06:22 crunchy Exp $ + * $Id: readline.c,v 1.3 2002/10/13 19:46:51 crunchy Exp $ * * Copyright (C) 2001 Andreas Büsching * @@ -90,6 +90,11 @@ mpiosh_readline_comp_mpio_file(const char *text, int state) WORD year; DWORD fsize; + if (mpiosh.dev == NULL) { + rl_attempted_completion_over = 1; + return NULL; + } + if (state == 0) p = mpio_directory_open(mpiosh.dev, mpiosh.card); while ((p != NULL) && (arg == NULL)) { -- cgit v1.2.3