summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Plugins/Bugzilla.cpp25
1 files changed, 18 insertions, 7 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index 8a901e39..429adfce 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -182,13 +182,24 @@ bool CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent, const
void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrashReport, std::string& pDescription)
{
- pDescription = "\nabrt detected crash.\n"
- "\n\nHow to reproduce\n"
- "-----\n" +
- pCrashReport.find(CD_REPRODUCE)->second[CD_CONTENT] +
- "\n\nCommnet\n"
- "-----\n" +
- pCrashReport.find(CD_COMMENT)->second[CD_CONTENT] +
+ std::string howToReproduce;
+ std::string comment;
+
+ if (pCrashReport.find(CD_REPRODUCE) != pCrashReport.end())
+ {
+ howToReproduce = "\n\nHow to reproduce\n"
+ "-----\n" +
+ pCrashReport.find(CD_REPRODUCE)->second[CD_CONTENT];
+ }
+ if (pCrashReport.find(CD_COMMENT) != pCrashReport.end())
+ {
+ comment = "\n\nCommnet\n"
+ "-----\n" +
+ pCrashReport.find(CD_COMMENT)->second[CD_CONTENT];
+ }
+ pDescription = "\nabrt detected crash.\n" +
+ howToReproduce +
+ comment +
"\n\nAdditional information\n"
"======\n";