mirror of
https://github.com/corda/corda.git
synced 2025-04-09 04:15:35 +00:00
CORPRIV-665: Protect against NPE
This commit is contained in:
parent
b29235e7cd
commit
6fd9399b20
@ -9,12 +9,12 @@ class CloseableTab(text: String, content: Node) : Tab(text, content) {
|
||||
|
||||
fun requestClose() {
|
||||
val b = behaviour
|
||||
if (b.canCloseTab(this)) {
|
||||
if ((b != null) && b.canCloseTab(this)) {
|
||||
b.closeTab(this)
|
||||
}
|
||||
}
|
||||
|
||||
private val behaviour: TabPaneBehavior
|
||||
get() = (tabPane.skin as TabPaneSkin).behavior
|
||||
private val behaviour: TabPaneBehavior?
|
||||
get() = (tabPane.skin as TabPaneSkin?)?.behavior
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user