Fortunately this is the newbie forum because I feel dumb all of a sudden. I did a search. My problem is that calling toStdString() on a QString crashes my program resulting in an access violation

The following code compiles and runs, but then crashes:

Qt Code:
  1. void q_string_to_std_string()
  2. {
  3. QString herp("derp");
  4. herp.toStdString();
  5. }
To copy to clipboard, switch view to plain text mode 

Any help is appreciated.