Fixed (maybe) a memory leak.
Display a message box if image loading fails.