From db151bcec7843162c6dadf92afb1cf59957df943 Mon Sep 17 00:00:00 2001 From: mingchen Date: Mon, 9 Jun 2008 15:20:08 +0000 Subject: *Fixed bug that caused failure when System.Console.Readline returns null (no stdin) *Fixed bug that would crash the simulator if there were two physics/meshing engines loaded with the same name. --- OpenSim/Framework/Console/ConsoleBase.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Console/ConsoleBase.cs') diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index 5d8e5b9..c813e91 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs @@ -230,7 +230,14 @@ namespace OpenSim.Framework.Console { try { - return System.Console.ReadLine(); + string line = System.Console.ReadLine(); + while(line == null) + { + + line = System.Console.ReadLine(); + } + + return line; } catch (Exception e) { @@ -357,7 +364,8 @@ namespace OpenSim.Framework.Console public void Prompt() { string tempstr = CmdPrompt(m_componentName + "# "); - RunCommand(tempstr); + RunCommand(tempstr); + } public void RunCommand(string cmdline) -- cgit v1.1