Which sentence contains a dangling modifier?

A. While playing my electric guitar, the amplifier went dead.

B. While I was watching my favorite TV show, the telephone rang.

C. Whistling a happy tune, Marti walked slowly to school.

D. After studying late at night, Latise felt tired the next morning.