Praise be to Allah.
Shaykh ‘Abd ar-Rahmaan al-Barraak was asked this question and he replied:
He is obliged to give charity, but this is blameworthy according to sharee‘ah for two reasons:
1.He connected his vow to a kind of idle pursuit that is blameworthy according to sharee‘ah
2.It is a conditional vow, and conditional vows are haraam or makrooh; they do not put back anything that Allah has decreed; rather all they do is get something out of the miser.