From: <ce...@us...> - 2004-01-13 14:08:20
|
Update of /cvsroot/csseditor/net.sourceforge.csseditor/src/net/sourceforge/csseditor/internal/editor In directory sc8-pr-cvs1:/tmp/cvs-serv14030/src/net/sourceforge/csseditor/internal/editor Modified Files: CssEditor.java Log Message: Avoid a potential NPE Index: CssEditor.java =================================================================== RCS file: /cvsroot/csseditor/net.sourceforge.csseditor/src/net/sourceforge/csseditor/internal/editor/CssEditor.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CssEditor.java 27 Dec 2003 18:46:55 -0000 1.2 --- CssEditor.java 13 Jan 2004 14:08:17 -0000 1.3 *************** *** 328,332 **** private IRule getRuleAt(int offset) { ! return getStyleSheet().getRuleAt(offset); } --- 328,336 ---- private IRule getRuleAt(int offset) { ! IStyleSheet styleSheet = getStyleSheet(); ! if (styleSheet == null) { ! return null; ! } ! return styleSheet.getRuleAt(offset); } |