From 56dcdee39b99b52a321802274723f8823e3ab408 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 12 Apr 2010 11:47:17 +1000 Subject: Fix crash on QScriptProgram destruction --- src/script/api/qscriptprogram.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/script/api/qscriptprogram.cpp b/src/script/api/qscriptprogram.cpp index 8d4de11..02beba4 100644 --- a/src/script/api/qscriptprogram.cpp +++ b/src/script/api/qscriptprogram.cpp @@ -63,6 +63,10 @@ QScriptProgramPrivate::QScriptProgramPrivate(const QString &src, QScriptProgramPrivate::~QScriptProgramPrivate() { + if (engine) { + QScript::APIShim shim(engine); + _executable.clear(); + } } QScriptProgramPrivate *QScriptProgramPrivate::get(const QScriptProgram &q) -- cgit v0.12