[547226] Fix potential NPE when closing the editor on 2018-09 and later Make the code more robust using the same rules as used in: https://git.eclipse.org/c/sourceediting/webtools.sourceediting.git/commit/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java?id=b260c28651005022730199d1f5fb49f7a182ee2a Bug: 547226 Change-Id: Ic3d406cf0b1abd5b08c30e40e607771740aef458 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>