build plugin: fix a bunch of crashes if no item is selected
build plugin: fix a bunch of crashes if no item is selected

Alex

DickJ/kate,DickJ/kate,sandsmark/kate,sandsmark/kate,sandsmark/kate,hlamer/kate,hlamer/kate,DickJ/kate,DickJ/kate,hlamer/kate,sandsmark/kate,hlamer/kate,cmacq2/kate,cmacq2/kate,jfmcarreira/kate,hlamer/kate,hlamer/kate,jfmcarreira/kate,jfmcarreira/kate,hlamer/kate,hlamer/kate,cmacq2/kate,hlamer/kate,hlamer/kate