Showing the changes to libraries/script-engine/src/v8/ScriptEngineV8.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1540,7 +1540,11 @@ void ScriptEngineV8::setThread(QThread* thread) { · 1539 unmodified lines | ||
| 1540 | 1540 | |
| 1541 | 1541 | |
| 1542 | 1542 | std::shared_ptr<ScriptException> ScriptEngineV8::uncaughtException() const { |
| 1543 | − return _uncaughtException->clone(); | |
| 1543 | + if (_uncaughtException) { | |
| 1544 | + return _uncaughtException->clone(); | |
| 1545 | + } else { | |
| 1546 | + return std::shared_ptr<ScriptException>(); | |
| 1547 | + } | |
| 1544 | 1548 | } |
| 1545 | 1549 | |
| 1546 | 1550 | bool ScriptEngineV8::raiseException(const QString& error, const QString &reason) { |