diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 427fe832bb2..d80029f0e39 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,7 @@ +2004-04-23 Alain Magloire + Possible NPE. + * src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java + 2004-04-23 Hoda Amer Fix for bug#59631 : Macros do not appear in the completion list when no prefix is provided Fix for bug#59686 : [Content Assist] Class references are not completing diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java index c7172088b18..7cd6e490c7c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java @@ -100,7 +100,10 @@ public class CDocumentProvider extends TextFileDocumentProvider { } } else if (element instanceof ITranslationUnitEditorInput) { ITranslationUnitEditorInput input = (ITranslationUnitEditorInput)element; - copy = new CFileElementWorkingCopy(input.getTranslationUnit()); + ITranslationUnit u = input.getTranslationUnit(); + if (u != null) { + copy = new CFileElementWorkingCopy(u); + } } if (copy == null) {