mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Thread check, for consistency.
This commit is contained in:
parent
f0a4e25e89
commit
913842ac30
1 changed files with 4 additions and 0 deletions
|
@ -54,6 +54,10 @@ void AnimVariantMap::copyVariantsFrom(const AnimVariantMap& other) {
|
|||
}
|
||||
}
|
||||
void AnimVariantMap::animVariantMapFromScriptValue(const QScriptValue& source) {
|
||||
if (QThread::currentThread() != source.engine()->thread()) {
|
||||
qCWarning(animation) << "Cannot examine Javacript object from non-script thread" << QThread::currentThread();
|
||||
return;
|
||||
}
|
||||
// POTENTIAL OPTIMIZATION: cache the types we've seen. I.e, keep a dictionary mapping property names to an enumeration of types.
|
||||
// Whenever we identify a new outbound type in animVariantMapToScriptValue above, or a new inbound type in the code that follows here,
|
||||
// we would enter it into the dictionary. Then switch on that type here, with the code that follow being executed only if
|
||||
|
|
Loading…
Reference in a new issue