libpurple/log.c

branch
release-2.x.y
changeset 40925
a4a68d315090
parent 39983
2e9efd7d3b78
child 43263
b9cf92c8b16b
--- a/libpurple/log.c	Thu Jun 03 19:30:26 2021 -0500
+++ b/libpurple/log.c	Thu Jun 03 19:31:56 2021 -0500
@@ -1390,7 +1390,7 @@
 		data = log->logger_data;
 
 		/* if we can't write to the file, give up before we hurt ourselves */
-		if(!data->file)
+		if(data == NULL || data->file == NULL)
 			return 0;
 
 		date = purple_date_format_full(localtime(&log->time));
@@ -1550,7 +1550,7 @@
 		data = log->logger_data;
 
 		/* if we can't write to the file, give up before we hurt ourselves */
-		if(!data->file)
+		if(data == NULL || data->file == NULL)
 			return 0;
 
 		if (log->type == PURPLE_LOG_SYSTEM)

mercurial