changeset 18785:3cc77409b858

bug with flags variable initialization was fixed
author Michael Shkutkov <mshkutkov@soc.pidgin.im>
date Thu, 02 Aug 2007 19:52:00 +0000
parents 6840a28e8f1d
children 60b405e0b28e
files libpurple/plugins/log_reader.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/log_reader.c	Thu Aug 02 19:34:29 2007 +0000
+++ b/libpurple/plugins/log_reader.c	Thu Aug 02 19:52:00 2007 +0000
@@ -236,7 +236,8 @@
 
 	/* XXX: TODO: We probably want to set PURPLE_LOG_READ_NO_NEWLINE
 	 * XXX: TODO: for HTML logs. */
-	*flags = 0;
+	if (flags != NULL)
+		*flags = 0;
 
 	g_return_val_if_fail(log != NULL, g_strdup(""));
 
@@ -1428,7 +1429,9 @@
 	char *c;
 	const char *line;
 
-	*flags = PURPLE_LOG_READ_NO_NEWLINE;
+	if (flags != NULL)
+		*flags = PURPLE_LOG_READ_NO_NEWLINE;
+
 	g_return_val_if_fail(log != NULL, g_strdup(""));
 
 	data = log->logger_data;
@@ -1924,7 +1927,9 @@
 	char *utf8_string;
 	FILE *file;
 
-	*flags = PURPLE_LOG_READ_NO_NEWLINE;
+	if (flags != NULL)
+		*flags = PURPLE_LOG_READ_NO_NEWLINE;
+
 	g_return_val_if_fail(log != NULL, g_strdup(""));
 
 	data = log->logger_data;