diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/org/connectbot/ConsoleActivity.java | 15 | 
1 files changed, 13 insertions, 2 deletions
diff --git a/src/org/connectbot/ConsoleActivity.java b/src/org/connectbot/ConsoleActivity.java index 9223a18..803b84b 100644 --- a/src/org/connectbot/ConsoleActivity.java +++ b/src/org/connectbot/ConsoleActivity.java @@ -764,8 +764,19 @@ public class ConsoleActivity extends Activity {  					.setView(resizeView)  					.setPositiveButton(R.string.button_resize, new DialogInterface.OnClickListener() {  						public void onClick(DialogInterface dialog, int which) { -							int width = Integer.parseInt(((EditText)resizeView.findViewById(R.id.width)).getText().toString()); -							int height = Integer.parseInt(((EditText)resizeView.findViewById(R.id.height)).getText().toString()); +							int width, height; +							try { +								width = Integer.parseInt(((EditText) resizeView +										.findViewById(R.id.width)) +										.getText().toString()); +								height = Integer.parseInt(((EditText) resizeView +										.findViewById(R.id.height)) +										.getText().toString()); +							} catch (NumberFormatException nfe) { +								// TODO change this to a real dialog where we can +								// make the input boxes turn red to indicate an error. +								return; +							}  							terminalView.forceSize(width, height);  						}  | 
