It closes the window, but not the launcher process. When I run the launcher after this, the process is detected to already be running and so the new instance of the launcher will close. Hopefully that clears it up.
I had this issue AFTER playing the new snapshot 17w43a!
My launcher is the standard launcher (latest version) and launching anything will cause the launcher to crash. (before it closes)
No, this is a bug with the LAUNCHER, not OptiFine. I've tried Vanilla, and it does the exact same thing.
Sorry, it was 2.1.3676 (i'm super dumb and didn't care about checking the launcher version and assumed I was on the very latest version)