summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-18 16:06:51 +0100
committerinfirit <[email protected]>2014-12-18 16:06:51 +0100
commit3d122e030b4b139ec563de4e0d16a2bceb0a9bf9 (patch)
treeb6c4d23465853836f4a9a3febcdf75cddd218961
parentb4e600308a77d19b56b66e0f3130f9ccf97ac825 (diff)
downloadmate-system-monitor-3d122e030b4b139ec563de4e0d16a2bceb0a9bf9.tar.bz2
mate-system-monitor-3d122e030b4b139ec563de4e0d16a2bceb0a9bf9.tar.xz
Do not set gnome_version if one of the version numbers can not be read
Taken from GSM commit: 9b3e48f0ef1131dfc827fb17d6cccb26ebde75c0 From: Robert Roth <[email protected]> Gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=576863
-rw-r--r--src/sysinfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 2f0d5dc..6789a3c 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -202,7 +202,8 @@ namespace {
xmlXPathFreeContext(context);
xmlFreeDoc(document);
- this->mate_version = values[0] + '.' + values[1] + '.' + values[2];
+ if (!values[0].empty() && !values[1].empty() && !values[2].empty())
+ this->mate_version = values[0] + '.' + values[1] + '.' + values[2];
}
};