Fixed crash when trying to paint with menu item not in database