Fix a crash when attempting to show error. Thanks IanWood62.