Unbreak QTextLine::glyphRuns() in a multi-threaded usage scenario
QFontEngineMulti expects the fallback families list to be initialized prior to the first call to engine(int), however in some scenarios, the initialized and cached engine gets destroyed and re-created later, with no fallback families list set, which causes an assertion. Change-Id: I8d19cc91f3a067f6bf77b36bd87010dd967b4c49 Reviewed-by: Lars Knoll <lars.knoll@digia.com>bb10
parent
4c022338aa
commit
066daf750f
|
|
@ -1622,7 +1622,8 @@ void QFontEngineMulti::setFallbackFamiliesList(const QStringList &fallbackFamili
|
|||
|
||||
void QFontEngineMulti::ensureEngineAt(int at)
|
||||
{
|
||||
Q_ASSERT(m_fallbackFamiliesQueried);
|
||||
if (!m_fallbackFamiliesQueried)
|
||||
ensureFallbackFamiliesQueried();
|
||||
Q_ASSERT(at < m_engines.size());
|
||||
if (!m_engines.at(at)) {
|
||||
QFontEngine *engine = loadEngine(at);
|
||||
|
|
|
|||
Loading…
Reference in New Issue