Fix a defined() check

Close #3233
1 file changed