1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

[386262] fixed NPE in setTerminalSize.

This commit is contained in:
Anna Dushistova 2012-10-01 18:17:14 +00:00
parent 9cd9abaaa0
commit f43fdf19c2

View file

@ -1,5 +1,5 @@
/***************************************************************************************************
* Copyright (c) 2008, 2010 Mirko Raner and others.
* Copyright (c) 2008, 2012 Mirko Raner and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -9,6 +9,7 @@
* Mirko Raner - [196337] initial implementation; some methods adapted from
* org.eclipse.tm.terminal.ssh/SshConnector
* Mirko Raner - [314977] Dynamically disable when no PTY is available
* Anna Dushistova(MontaVista) - [386262] NPE in setTerminalSize
**************************************************************************************************/
package org.eclipse.tm.internal.terminal.local;
@ -52,7 +53,7 @@ import org.eclipse.tm.internal.terminal.provisional.api.provider.TerminalConnect
* <code>vi</code> editor).
*
* @author Mirko Raner
* @version $Revision: 1.5 $
* @version $Revision: 1.6 $
*/
public class LocalTerminalConnector extends TerminalConnectorImpl
implements IDebugEventSetListener {
@ -342,7 +343,7 @@ implements IDebugEventSetListener {
* @param height the new terminal height (in lines)
*/
public void setTerminalSize(int width, int height) {
if(process != null){
PTY pty = process.getPTY();
if (pty != null && (width != lastWidth || height != lastHeight)) {
@ -351,6 +352,7 @@ implements IDebugEventSetListener {
lastHeight = height;
}
}
}
/**
* Listens for self-induced termination of the launched process. For example, this method will