Better skin fix error handling

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2022-11-20 09:55:30 +00:00
parent ead59c0246
commit bfa5fe1598
2 changed files with 17 additions and 4 deletions

View File

@ -71,7 +71,13 @@ public final class SkinFix implements Fix, URLStreamHandlerFactory {
@Override
public void apply() {
URL.setURLStreamHandlerFactory(this);
try {
URL.setURLStreamHandlerFactory(this);
} catch (Error e) {
Log.warning("Cannot apply skin fix");
Log.warning("URLStreamHandlerFactory is already set");
Log.warning("Turning off legacy skin fix in Settings > Miscellaneous will silence the warnings");
}
}
@Override