diff src/com/five_ten_sg/connectbot/ConsoleActivity.java @ 415:885f2bca6032

avoid null pointer
author Carl Byington <carl@five-ten-sg.com>
date Mon, 27 Oct 2014 13:55:13 -0700
parents cf81ae79931d
children 07c1da90deab
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/ConsoleActivity.java	Sat Oct 25 10:52:39 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/ConsoleActivity.java	Mon Oct 27 13:55:13 2014 -0700
@@ -766,7 +766,8 @@
 
                 // pass any touch events back to detector
                 TerminalView terminalView = (TerminalView) findCurrentView(R.id.console_flip);
-                return  terminalView.mScaleDetector.onTouchEvent(event) | gestDetect.onTouchEvent(event);
+                if (terminalView && terminalView.mScaleDetector.onTouchEvent(event)) return true;;
+                return gestDetect.onTouchEvent(event);
             }
         });
     }