qt5
fix crash because of bad checking