You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ge...@apache.org on 2021/04/29 14:14:39 UTC

[netbeans] branch delivery updated: [NETBEANS-5640] Fixing potential NPE on out of project Folder creation

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

geertjan pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
     new 9db76a6  [NETBEANS-5640] Fixing potential NPE on out of project Folder creation
     new 70d100f  Merge pull request #2927 from lkishalmi/NETBEANS-5640
9db76a6 is described below

commit 9db76a6ee21cce9f45b7863c327249ca9a7ae502
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Thu Apr 29 07:01:57 2021 -0700

    [NETBEANS-5640] Fixing potential NPE on out of project Folder creation
---
 .../org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ide/projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java b/ide/projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java
index 3ed00e1..7117e10 100644
--- a/ide/projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java
+++ b/ide/projectui/src/org/netbeans/modules/project/ui/SimpleTargetChooserPanelGUI.java
@@ -551,8 +551,8 @@ public class SimpleTargetChooserPanelGUI extends javax.swing.JPanel implements A
         public @Override Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
             if (value instanceof SourceGroup) {
                 SourceGroup group = (SourceGroup)value;
-                String projectDisplayName = ProjectUtils.getInformation( project ).getDisplayName();
                 String groupDisplayName = group.getDisplayName();
+                String projectDisplayName = project != null ? ProjectUtils.getInformation( project ).getDisplayName() : groupDisplayName;
                 if ( projectDisplayName.equals( groupDisplayName ) ) {
                     setText( groupDisplayName );
                 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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