Fix #6389.
Previously this code assumed that all add-ons would have a _server.pbl or an _info.cfg. When neither was the case, it tried to dereference the begin() of an empty set, causing the crash.
This commit is contained in:
parent
439de2531d
commit
c1058215e5
1 changed files with 5 additions and 1 deletions
|
@ -51,7 +51,11 @@ addon_tracking_info get_addon_tracking_info(const addon_info& addon)
|
|||
} else {
|
||||
// We normally use the _info.cfg version instead.
|
||||
t.installed_version = get_addon_version_info(id);
|
||||
t.remote_version = *addon.versions.begin();
|
||||
if(addon.versions.size() > 0) {
|
||||
t.remote_version = *addon.versions.begin();
|
||||
} else {
|
||||
t.remote_version = version_info(0,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
if(t.remote_version == t.installed_version) {
|
||||
|
|
Loading…
Add table
Reference in a new issue