Don't crash when showing diff and discarding changes