[gnote] remove a runtime warning caused by glib.
- From: Hubert Figuière <hub src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnote] remove a runtime warning caused by glib.
- Date: Wed, 27 May 2009 18:35:04 -0400 (EDT)
commit 50f953833de3c230731e83f33de1920fb5128281
Author: Hubert Figuiere <hub figuiere net>
Date: Tue May 26 00:16:30 2009 -0400
remove a runtime warning caused by glib.
---
src/sharp/datetime.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/sharp/datetime.cpp b/src/sharp/datetime.cpp
index 994a7f6..82dadb8 100644
--- a/src/sharp/datetime.cpp
+++ b/src/sharp/datetime.cpp
@@ -108,6 +108,9 @@ namespace sharp {
std::string DateTime::to_iso8601() const
{
std::string retval;
+ if(!is_valid()) {
+ return retval;
+ }
char * iso8601 = g_time_val_to_iso8601(const_cast<GTimeVal*>(&m_date));
if(iso8601) {
retval = iso8601;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]