From 72ebc94de0e7fda14fdef9eecc2f7ca50b92891f Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Fri, 27 Mar 2015 20:30:05 +0000 Subject: 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 --- src/org/connectbot/transport/Local.java | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- cgit v1.2.3