[170080] [content assist] null pointer exception in StyleElementAdapter
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleElementAdapter.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleElementAdapter.java
index 94beee7..f26c904 100644
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleElementAdapter.java
+++ b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleElementAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -166,7 +166,9 @@
modelProvideAdapter.modelProvided(model);
// from createModel()
- IStructuredDocument structuredDocument = model.getStructuredDocument();
+ IStructuredDocument structuredDocument = null;
+ if (model != null)
+ structuredDocument = model.getStructuredDocument();
if (structuredDocument == null)
return null;
structuredDocument.addDocumentChangedListener(this);