[gnote] Fix exception in xml_node_xpath_find_single
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Fix exception in xml_node_xpath_find_single
- Date: Thu, 16 Feb 2012 14:29:50 +0000 (UTC)
commit 3d5b34804f6e293a33a5a9d418f6a6246c68ca06
Author: Aurimas Äernius <aurisc4 gmail com>
Date: Thu Feb 16 16:23:08 2012 +0200
Fix exception in xml_node_xpath_find_single
Exception is thrown, when nothing is found.
src/sharp/xml.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/sharp/xml.cpp b/src/sharp/xml.cpp
index ac052cb..c43d07b 100644
--- a/src/sharp/xml.cpp
+++ b/src/sharp/xml.cpp
@@ -77,7 +77,8 @@ namespace sharp {
return "";
}
- return reinterpret_cast<char*>(XML_GET_CONTENT(n));
+ char *res = reinterpret_cast<char*>(XML_GET_CONTENT(n));
+ return res ? res : "";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]