sg: fix crash when deleting shader program