svn commit: r13788 - trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2007-11-18 07:14:30-0800
New Revision: 13788

Modified:
   trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java

Log:
Fix for issue 4911, as supplied by Lukasz G.

Modified: trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java?view=diff&rev=13788&p1=trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java&p2=trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java&r1=13787&r2=13788
==============================================================================
--- trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java	(original)
+++ trunk/src_new/org/argouml/uml/diagram/ui/FigNodeModelElement.java	2007-11-18 07:14:30-0800
@@ -2194,8 +2194,17 @@
      * @return the font style for the nameFig.
      */
     protected int getNameFigFontStyle() {
-        ProjectSettings ps = getProject().getProjectSettings();
-        showBoldName = ps.getShowBoldNamesValue();
+    	showBoldName = false;
+    	Project p = getProject();
+
+        /**
+         *  When and why p could be NULL?
+         *  See issue 4911.
+         */
+        if (p != null) {
+            ProjectSettings ps = p.getProjectSettings();
+            showBoldName = ps.getShowBoldNamesValue();
+        }
         
         return showBoldName ? Font.BOLD : Font.PLAIN;
     }
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.