Qt4 - Fix the double free. Close #1397.