diff options
author | Kenny Root <kenny@the-b.org> | 2015-03-27 20:30:05 +0000 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2015-03-27 20:31:43 +0000 |
commit | 72ebc94de0e7fda14fdef9eecc2f7ca50b92891f (patch) | |
tree | f7ad8ddca146ff43b3870bd5d825ab06dedb5f72 | |
parent | 8a9540082db537752dde396c8e163cd1a9b503ef (diff) | |
download | connectbot-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.java | 5 |
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) { |