!icon.isNull() doesn't guarantee a valid icon
from qicon docs: Note: Even a non-null icon might not be able to create valid pixmaps, eg. if the file does not exist or cannot be read.
check on the available sizes instead