libmbca r16 - trunk/src



Author: kaijanma
Date: Fri Aug 15 09:29:37 2008
New Revision: 16
URL: http://svn.gnome.org/viewvc/libmbca?rev=16&view=rev

Log:
fix newer glib assertion failure about g_ascii_strcasecmp value being NULL

Modified:
   trunk/src/provider_thread.c

Modified: trunk/src/provider_thread.c
==============================================================================
--- trunk/src/provider_thread.c	(original)
+++ trunk/src/provider_thread.c	Fri Aug 15 09:29:37 2008
@@ -436,9 +436,12 @@
 				continue;
 			}
 		}
-		if (g_ascii_strcasecmp (timezone, loc->tz_hint) == 0)
-		{		
-			return loc->country_code;
+		if (loc->tz_hint)
+		{
+			if (g_ascii_strcasecmp (timezone, loc->tz_hint) == 0)
+			{		
+				return loc->country_code;
+			}
 		}
 	}
 	while (gtk_tree_model_iter_next (gweather_database, &location)
@@ -516,9 +519,12 @@
 					continue;
 				}
 			}
-			if (g_ascii_strcasecmp (timezone, loc->tz_hint) == 0)
-			{		
-				return loc->country_code;
+			if (loc->tz_hint)
+			{
+				if (g_ascii_strcasecmp (timezone, loc->tz_hint) == 0)
+				{		
+					return loc->country_code;
+				}
 			}
 		}
 		while (gtk_tree_model_iter_next (gweather_database, &location)



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