In Popup Menus the share item does not always have actionProvider, check...

... for an actionprovider in the menu handler (fixes #3996)