mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Add a missing null check since terminal properties can be null (#620)
Removes a redundant map lookup too. Fixes #617
This commit is contained in:
parent
9ba721566d
commit
050770d37a
1 changed files with 5 additions and 7 deletions
|
@ -127,15 +127,13 @@ public class TabTerminalListener implements ITerminalListener3 {
|
|||
// Get the original terminal properties associated with the tab item
|
||||
@SuppressWarnings({ "unchecked" })
|
||||
final Map<String, Object> properties = (Map<String, Object>) item.getData("properties"); //$NON-NLS-1$
|
||||
if (properties.containsKey(ITerminalsConnectorConstants.PROP_TITLE_DISABLE_ANSI_TITLE)) {
|
||||
if (properties.get(
|
||||
ITerminalsConnectorConstants.PROP_TITLE_DISABLE_ANSI_TITLE) instanceof Boolean disableAnsi) {
|
||||
if (properties != null && properties
|
||||
.get(ITerminalsConnectorConstants.PROP_TITLE_DISABLE_ANSI_TITLE) instanceof Boolean disableAnsi) {
|
||||
// Check if terminal title can be updated from ANSI escape sequence
|
||||
if (disableAnsi && requestor == TerminalTitleRequestor.ANSI) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// New title must have value.
|
||||
if (title != null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue