2003-08-08 Andrew Cagney <cagney@redhat.com>

* interps.c (interp_set): Check for a NULL "old_interp".

Index: mi/ChangeLog
2003-08-08  Andrew Cagney  <cagney@redhat.com>

	* mi-main.c (captured_mi_execute_command): Add "mi2" and "mi3" to
	interpreters that hack around CLI.
	* mi-interp.c (mi3_command_loop): New function.
	(mi_interpreter_resume): Check for "mi3", default to "mi2".
This commit is contained in:
Andrew Cagney
2003-08-08 19:00:08 +00:00
parent c938e9b01d
commit f786f61510
5 changed files with 26 additions and 4 deletions

View File

@ -183,7 +183,7 @@ interp_set (struct interp *interp)
if (interp->procs->resume_proc != NULL
&& (!interp->procs->resume_proc (interp->data)))
{
if (!interp_set (old_interp))
if (old_interp == NULL || !interp_set (old_interp))
internal_error (__FILE__, __LINE__,
"Failed to initialize new interp \"%s\" %s",
interp->name, "and could not restore old interp!\n");