Merge "avoid crash in emptyBuffer when input buffer handle is invalid" into qt-dev