mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge pull request #15968 from annabrewer/android-crash-fix
BUGZ-996: Android app crashes on startup
This commit is contained in:
commit
a8842bf521
1 changed files with 4 additions and 3 deletions
|
@ -107,7 +107,8 @@ void Instance::enumerateNics() {
|
|||
|
||||
json Instance::getCPU(int index) {
|
||||
assert(index <(int) _cpus.size());
|
||||
if (index >= (int)_cpus.size())
|
||||
|
||||
if (index < 0 || (int) _cpus.size() <= index)
|
||||
return json();
|
||||
|
||||
return _cpus.at(index);
|
||||
|
@ -116,7 +117,7 @@ json Instance::getCPU(int index) {
|
|||
json Instance::getGPU(int index) {
|
||||
assert(index <(int) _gpus.size());
|
||||
|
||||
if (index >=(int) _gpus.size())
|
||||
if (index < 0 || (int) _gpus.size() <= index)
|
||||
return json();
|
||||
|
||||
return _gpus.at(index);
|
||||
|
@ -126,7 +127,7 @@ json Instance::getGPU(int index) {
|
|||
json Instance::getDisplay(int index) {
|
||||
assert(index <(int) _displays.size());
|
||||
|
||||
if (index >=(int) _displays.size())
|
||||
if (index < 0 || (int) _displays.size() <= index)
|
||||
return json();
|
||||
|
||||
return _displays.at(index);
|
||||
|
|
Loading…
Reference in a new issue