summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-11-19 15:56:20 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-11-19 15:56:20 +0100
commitfaed3f4735bb4e433bbd655c846d2e558e71e492 (patch)
tree45acf777fe6a9067ec8d32c0afca2aaefdf801f5 /src
parent50f70c6e3460c63d3aa6450177d78e149bc8ad55 (diff)
downloadabrt-faed3f4735bb4e433bbd655c846d2e558e71e492.tar.gz
abrt-faed3f4735bb4e433bbd655c846d2e558e71e492.tar.xz
abrt-faed3f4735bb4e433bbd655c846d2e558e71e492.zip
fix small bug where we use value first and *then* check for its validity
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src')
-rw-r--r--src/Daemon/MiddleWare.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index bbbca0ac..f3c6bdf4 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -380,12 +380,17 @@ static bool CheckReport(const map_crash_report_t& pCrashReport)
map_crash_report_t::const_iterator end = pCrashReport.end();
+ if (it_package == end)
+ {
+ return false;
+ }
+
// FIXME: bypass the test if it's kerneloops
if (it_package->second[CD_CONTENT] == "kernel")
return true;
if (it_analyzer == end || it_mwuid == end ||
- it_mwuuid == end || it_package == end ||
+ it_mwuuid == end || /* it_package == end || */
it_architecture == end || it_kernel == end ||
it_component == end || it_release == end ||
it_executable == end)