[gnote] Initialize buffer before returning text_content
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Initialize buffer before returning text_content
- Date: Sat, 22 Oct 2011 12:46:04 +0000 (UTC)
commit 0d47d42f678c1965ecdfad84331554eec4f13ff6
Author: Casey Harkins <caseyharkins gmail com>
Date: Sat Oct 22 14:52:21 2011 +0300
Initialize buffer before returning text_content
Fixes bug 647888.
Thanks Casey Harkins.
src/note.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/note.cpp b/src/note.cpp
index 5b38b12..7590230 100644
--- a/src/note.cpp
+++ b/src/note.cpp
@@ -1060,10 +1060,10 @@ namespace gnote {
std::string Note::text_content()
{
- if(m_buffer) {
- return m_buffer->get_slice(m_buffer->begin(), m_buffer->end());
+ if(!m_buffer) {
+ get_buffer();
}
- return utils::XmlDecoder::decode(xml_content());
+ return m_buffer->get_slice(m_buffer->begin(), m_buffer->end());
}
void Note::set_text_content(const std::string & text)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]