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

ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/master by this push:
     new 4eb3c4035 Fix potential NPE
4eb3c4035 is described below

commit 4eb3c403584695310d99aa47d0cf35855fccf548
Author: stariy95 <stari...@gmail.com>
AuthorDate: Fri Nov 24 13:19:46 2023 +0400

    Fix potential NPE
---
 .../src/main/java/org/apache/cayenne/modeler/editor/DataMapView.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/DataMapView.java
 
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/DataMapView.java
index d8c077d8c..95e291d7b 100644
--- 
a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/DataMapView.java
+++ 
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/DataMapView.java
@@ -482,7 +482,7 @@ public class DataMapView extends JPanel {
 
     public void updateNamesAfterSaving(ProjectSavedEvent e) {
         DataMap currentDataMap = eventController.getCurrentDataMap();
-        if(!currentDataMap.getLocation().equals(location.getText())) {
+        if(currentDataMap != null && 
!currentDataMap.getLocation().equals(location.getText())) {
             location.setText(currentDataMap.getLocation());
         }
     }

Reply via email to