NullPointerException when open editor!

I am using build 1154
I am listening the project change in ProjectManagerListener,
when a new project is opened, then i need to create some file and open then in editor.
But at that time, it will throw null pointer.
What's going on?
Thx.

java.lang.NullPointerException
at com.intellij.psi.impl.e.a.b.b(b.java:209)
at com.intellij.psi.impl.e.a.b.a(b.java:164)
at com.intellij.psi.impl.e.a.b.a(b.java:96)
at com.intellij.psi.impl.bh.findFile(bh.java:266)
at com.intellij.ide.e.k$3.selectionChanged(k$3.java:2)
at com.intellij.openapi.fileEditor.a.f.a(f.java:558)
at com.intellij.openapi.fileEditor.a.f.b(f.java:563)
at com.intellij.openapi.fileEditor.a.f.access$900(f.java:726)
at com.intellij.openapi.fileEditor.a.f$3.run(f$3.java)
at com.intellij.openapi.command.impl.a.executeCommand(a.java:4)
at com.intellij.openapi.fileEditor.a.f.a(f.java:352)
at com.intellij.openapi.fileEditor.a.f.openFile(f.java:491)

Please sign in to leave a comment.