This is an automated email from the ASF dual-hosted git repository.

lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 2fa2a71  [NETBEANS-2220] Preventing NPE when there is no item at the 
specified cell in the table.
2fa2a71 is described below

commit 2fa2a71edc8c2ce1d1597d0d0f9a0707cea4c45a
Author: Jan Lahoda <[email protected]>
AuthorDate: Fri Mar 8 08:32:43 2019 +0100

    [NETBEANS-2220] Preventing NPE when there is no item at the specified cell 
in the table.
---
 .../src/org/netbeans/swing/tabcontrol/DocumentSwitcherTable.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/platform/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/DocumentSwitcherTable.java
 
b/platform/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/DocumentSwitcherTable.java
index 422dcf7..11ee0ff 100644
--- 
a/platform/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/DocumentSwitcherTable.java
+++ 
b/platform/o.n.swing.tabcontrol/src/org/netbeans/swing/tabcontrol/DocumentSwitcherTable.java
@@ -85,7 +85,7 @@ class DocumentSwitcherTable extends SwitcherTable {
             return false;
         Item item = ( Item ) getModel().getValueAt( selRow, selCol );
         // #268040 - check whether the item is closable
-        if (isClosable(item)) {
+        if (null != item && isClosable(item)) {
             Rectangle rect = getCellRect( selRow, selCol, false );
             if( rect.contains( p ) ) {
                 Dimension size = btnClose.getPreferredSize();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to