fix crash in the new warning message.
Merge pull request #1707 from nouiz/warn_msg

fix crash in the new warning message.