Merge "Fix the potential NullPointerException." into qt-dev