svn commit: r19224 - trunk/src/argouml-app/src/org/argouml/ui/ProjectBrowser.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2011-04-12 14:17:45-0700
New Revision: 19224

Modified:
   trunk/src/argouml-app/src/org/argouml/ui/ProjectBrowser.java

Log:
Issue 6233 - protect against NPE

Modified: trunk/src/argouml-app/src/org/argouml/ui/ProjectBrowser.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/ProjectBrowser.java?view=diff&pathrev=19224&r1=19223&r2=19224
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/ProjectBrowser.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/ui/ProjectBrowser.java	2011-04-12 14:17:45-0700
@@ -1395,7 +1395,15 @@
             /*
              * notification of menu bar
              */
-            saveAction.setEnabled(false);
+            if (saveAction != null) {
+                // Bob says - not sure how saveAction could be null here but
+                // NPE has been reported. See issue 6233. As Tom comments
+                // elsewhere we should be listening for file save events.
+                // That would allow us to have a final saveAction instance
+                // that can never be null
+                saveAction.setEnabled(false);
+            }
+            
             addFileSaved(file);
 
             Configuration.setString(Argo.KEY_MOST_RECENT_PROJECT_FILE,

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2719217

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.