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,13 +127,11 @@ public class TabTerminalListener implements ITerminalListener3 {
|
||||||
// Get the original terminal properties associated with the tab item
|
// Get the original terminal properties associated with the tab item
|
||||||
@SuppressWarnings({ "unchecked" })
|
@SuppressWarnings({ "unchecked" })
|
||||||
final Map<String, Object> properties = (Map<String, Object>) item.getData("properties"); //$NON-NLS-1$
|
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 != null && properties
|
||||||
if (properties.get(
|
.get(ITerminalsConnectorConstants.PROP_TITLE_DISABLE_ANSI_TITLE) instanceof Boolean disableAnsi) {
|
||||||
ITerminalsConnectorConstants.PROP_TITLE_DISABLE_ANSI_TITLE) instanceof Boolean disableAnsi) {
|
// Check if terminal title can be updated from ANSI escape sequence
|
||||||
// Check if terminal title can be updated from ANSI escape sequence
|
if (disableAnsi && requestor == TerminalTitleRequestor.ANSI) {
|
||||||
if (disableAnsi && requestor == TerminalTitleRequestor.ANSI) {
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue