diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-09-20 10:10:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 14:27:17 +0200 |
commit | 0615bced19d6cdeb30c0929c7d0988b0b5785850 (patch) | |
tree | 7362ef093339ee85970074e52b611c273a758fb4 /src/qml/compiler/qv4compileddata.cpp | |
parent | 5f6ae3598e30ed64697ac24cc09d609830f66eb2 (diff) |
Fix crash in QV4::CompiledData::CompilationUnit
Don't crash when a CompilationUnit is created, never linked into an engine but instead
deleted (because there was an error elsewhere compililing the rest of QML
before it could reach the link-to-engine stage)
Change-Id: Iff535009b6b4d1fc4004987c98730251a3a7d8d8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index 2c128280fe..990cf195c0 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -65,7 +65,8 @@ namespace { CompilationUnit::~CompilationUnit() { - engine->compilationUnits.erase(engine->compilationUnits.find(this)); + if (engine) + engine->compilationUnits.erase(engine->compilationUnits.find(this)); if (ownsData) free(data); free(runtimeStrings); |