mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 18:47:46 +02:00
Guard against derefencing NULL
This commit is contained in:
parent
c7c7c35654
commit
214a18c446
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