svn commit: r15871 - trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2008-10-02 21:16:29-0700
New Revision: 15871

Modified:
   trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java

Log:
make last more NPE fix robust

Modified: trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java?view=diff&rev=15871&p1=trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java&p2=trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java&r1=15870&r2=15871
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java	2008-10-02 21:16:29-0700
@@ -219,7 +219,8 @@
             if (candidateProfile instanceof UserDefinedProfile) {
                 UserDefinedProfile userProfile = 
                     (UserDefinedProfile) candidateProfile;
-                if (userProfile.getModelFile().getName().equals(fileName)) {
+                if (userProfile.getModelFile() != null
+                    && fileName.equals(userProfile.getModelFile().getName())) {
                     return userProfile;
                 }
             }
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.