Remove icon dependency
Replace assertion with direct access

The executable file generated by setup.py seems to ignore assertions,
and this is an important check to be made.