From 0858d06e11de400fa0c7bbb013e2873d6f98be7c Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 9 Jun 2015 14:26:23 +0200 Subject: [PATCH] Fixed null pointer issue with source name. --- mix/ClientModel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mix/ClientModel.cpp b/mix/ClientModel.cpp index cad210f1b..17ff94503 100644 --- a/mix/ClientModel.cpp +++ b/mix/ClientModel.cpp @@ -539,7 +539,9 @@ void ClientModel::showDebuggerForTransaction(ExecutionResult const& _t) // filter out locations that match whole function or contract SourceLocation location = instruction.getLocation(); - QString source = QString::fromUtf8(location.sourceName->c_str()); + QString source; + if (location.sourceName) + source = QString::fromUtf8(location.sourceName->c_str()); if (m_codeModel->isContractOrFunctionLocation(location)) location = dev::SourceLocation(-1, -1, location.sourceName);