Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pychan: Remove Icon from manager on source load failure
When creating an `Icon` with an invalid file path, the `Icon` object first calls its parent's `__init__()` and then trys to load the image source. Loading the image might end up in e.g. `fife.NotFound`, but the parent's `__init__()` already added the new `Icon` instance to the manager. So while the code creating the `Icon` will never see an instance of it and can never call `hide()` to remove it, the manager still thinks that there's an instance available. This commit changes to code to remove the `Icon` from the manager for any occuring exception and then re-raise the exception.
- Loading branch information