[gnome-system-monitor] Do not set gnome_version if one of the version numbers can not be read.
- From: Chris KÃhl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Do not set gnome_version if one of the version numbers can not be read.
- Date: Tue, 15 Nov 2011 09:02:49 +0000 (UTC)
commit 9b3e48f0ef1131dfc827fb17d6cccb26ebde75c0
Author: Robert Roth <robert roth off gmail com>
Date: Tue Nov 15 06:57:35 2011 +0200
Do not set gnome_version if one of the version numbers can not be read.
https://bugzilla.gnome.org/show_bug.cgi?id=576863
src/sysinfo.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/sysinfo.cpp b/src/sysinfo.cpp
index 0286752..f1cb7d6 100644
--- a/src/sysinfo.cpp
+++ b/src/sysinfo.cpp
@@ -201,8 +201,8 @@ namespace {
xmlXPathFreeContext(context);
xmlFreeDoc(document);
-
- this->gnome_version = values[0] + '.' + values[1] + '.' + values[2];
+ if (!values[0].empty() && !values[1].empty() && !values[2].empty())
+ this->gnome_version = values[0] + '.' + values[1] + '.' + values[2];
}
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]