qt4: fix COM leak and handle errors
qt4: fix COM leak and handle errors

(cherry picked from commit 39e4fad1bc929bb35a5353380b456e36f23ea1c4)
Signed-off-by: Jean-Baptiste Kempf <7b85a41a628204b76aba4326273a3ccc74bd009a@videolan.org>

jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2,jomanmuk/vlc-2.2