It is narrated from Sayyiduna Thabit bin al-Dahhak (may Allah be pleased with him) that he pledged allegiance to the Messenger of Allah (peace and blessings be upon him) beneath the tree, and that the Messenger of Allah (peace and blessings be upon him) said: "Whoever swears falsely by a religion other than Islam, he is as he said; and whoever kills himself with something will be punished with it on the Day of Resurrection; and there is no vow upon a man in what he does not own."
Hadith Referenceالمعجم الكبير للطبراني / باب الثاء / 1320