mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
Merge pull request #4137 from ctrlaltdavid/null-dereference
Guard against derefencing NULL
This commit is contained in:
commit
a41ef94f5c
1 changed files with 6 additions and 1 deletions
|
@ -220,7 +220,12 @@ unsigned int Overlays::cloneOverlay(unsigned int id) {
|
||||||
} else if (_overlaysWorld.contains(id)) {
|
} else if (_overlaysWorld.contains(id)) {
|
||||||
thisOverlay = _overlaysWorld[id];
|
thisOverlay = _overlaysWorld[id];
|
||||||
}
|
}
|
||||||
return addOverlay(thisOverlay->createClone());
|
|
||||||
|
if (thisOverlay) {
|
||||||
|
return addOverlay(thisOverlay->createClone());
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0; // Not found
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Overlays::editOverlay(unsigned int id, const QScriptValue& properties) {
|
bool Overlays::editOverlay(unsigned int id, const QScriptValue& properties) {
|
||||||
|
|
Loading…
Reference in a new issue