aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-03-27 20:30:05 +0000
committerKenny Root <kenny@the-b.org>2015-03-27 20:31:43 +0000
commit72ebc94de0e7fda14fdef9eecc2f7ca50b92891f (patch)
treef7ad8ddca146ff43b3870bd5d825ab06dedb5f72
parent8a9540082db537752dde396c8e163cd1a9b503ef (diff)
downloadconnectbot-72ebc94de0e7fda14fdef9eecc2f7ca50b92891f.tar.gz
connectbot-72ebc94de0e7fda14fdef9eecc2f7ca50b92891f.tar.bz2
connectbot-72ebc94de0e7fda14fdef9eecc2f7ca50b92891f.zip
Do not try to resize local PTY before connection
At that point shellFd is null and trying to get a field from it via JNI will cause the runtime to abort. Fixes #65
-rw-r--r--src/org/connectbot/transport/Local.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/connectbot/transport/Local.java b/src/org/connectbot/transport/Local.java
index 5ace1b0..f7bbf11 100644
--- a/src/org/connectbot/transport/Local.java
+++ b/src/org/connectbot/transport/Local.java
@@ -153,6 +153,11 @@ public class Local extends AbsTransport {
@Override
public void setDimensions(int columns, int rows, int width, int height) {
+ // We are not connected yet.
+ if (shellFd == null) {
+ return;
+ }
+
try {
Exec.setPtyWindowSize(shellFd, rows, columns, width, height);
} catch (Exception e) {