Bugfix for editor selection

Fixes NPE in case there is no active editor when opening a view, patch
provided by Albert Veli

Signed-off-by: Dominik Schadow <dominikschadow@googlemail.com>