it's possible that libsym is NULL here (if the library wasn't found). the existing code shouldn't have had a problem with it