Fix a possible crash when starting MPC-HC with the web interface enabled.

This commit fixes #3243.