mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:35:08 +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)) {
|
||||
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) {
|
||||
|
|
Loading…
Reference in a new issue