mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1233016 - about:profiles should handle errors when the defaultProfile is not set, r=ehsan
This commit is contained in:
parent
c3cea57c51
commit
d2c3f5e6f1
@ -62,13 +62,18 @@ function refreshUI() {
|
||||
parent.removeChild(parent.firstChild);
|
||||
}
|
||||
|
||||
let currentProfile = findCurrentProfile() || ProfileService.defaultProfile;
|
||||
let defaultProfile;
|
||||
try {
|
||||
defaultProfile = ProfileService.defaultProfile;
|
||||
} catch(e) {}
|
||||
|
||||
let currentProfile = findCurrentProfile() || defaultProfile;
|
||||
|
||||
let iter = ProfileService.profiles;
|
||||
while (iter.hasMoreElements()) {
|
||||
let profile = iter.getNext().QueryInterface(Ci.nsIToolkitProfile);
|
||||
display({ profile: profile,
|
||||
isDefault: profile == ProfileService.defaultProfile,
|
||||
isDefault: profile == defaultProfile,
|
||||
isCurrentProfile: profile == currentProfile });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user