[ekiga/gnome-2-26] Enhance previous commit (warn user if conversion error)



commit 151faefd709fe57bbb889c340245e813df0815be
Author: Eugen Dedu <Eugen Dedu pu-pm univ-fcomte fr>
Date:   Fri Jul 24 19:35:46 2009 +0200

    Enhance previous commit (warn user if conversion error)

 lib/engine/components/ptlib/utils.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/lib/engine/components/ptlib/utils.cpp b/lib/engine/components/ptlib/utils.cpp
index 72626b6..63a9a07 100644
--- a/lib/engine/components/ptlib/utils.cpp
+++ b/lib/engine/components/ptlib/utils.cpp
@@ -54,7 +54,8 @@ latin2utf (const std::string str)
                         "UTF-8", "ISO-8859-1",
                         NULL, NULL, NULL);
 #endif
-  if (utf8_str == NULL) /* conversion error */
+  g_warn_if_fail (utf8_str != NULL);
+  if (utf8_str == NULL)  /* conversion error */
     return NULL;
   result = std::string (utf8_str);
   g_free (utf8_str);
@@ -79,7 +80,8 @@ utf2latin (const std::string str)
                          "ISO-8859-1", "UTF-8",
                          NULL, NULL, NULL);
 #endif
-  if (latin_str == NULL) /* conversion error */
+  g_warn_if_fail (latin_str != NULL);
+  if (latin_str == NULL)  /* conversion error */
     return NULL;
   result = std::string (latin_str);
   g_free (latin_str);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]