Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/skype4pidgin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kamil Kozar <dkk089@gmail.com>2018-03-15 00:44:53 +0300
committerDaniel Kamil Kozar <dkk089@gmail.com>2018-03-15 00:44:53 +0300
commitc2422b64bd23162f5a4caf9e672e5cd1d83da859 (patch)
tree5719c8e186cb90655f1d7617ffee7145fe1a96df
parent816aaddea4493b8f8708e3bf5aa68fba3c9daef7 (diff)
Add null checks for the output length in create_search_results
-rw-r--r--skypeweb/skypeweb_contacts.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/skypeweb/skypeweb_contacts.c b/skypeweb/skypeweb_contacts.c
index 01b5d1e..21f6ef9 100644
--- a/skypeweb/skypeweb_contacts.c
+++ b/skypeweb/skypeweb_contacts.c
@@ -939,7 +939,10 @@ create_search_results(JsonNode *node, gint *olength)
PurpleNotifySearchResults *results = purple_notify_searchresults_new();
if (results == NULL || length == 0)
{
- *olength = 0;
+ if (olength)
+ {
+ *olength = 0;
+ }
return NULL;
}
@@ -982,7 +985,10 @@ create_search_results(JsonNode *node, gint *olength)
purple_notify_searchresults_row_add(results, row);
}
- *olength = length;
+ if (olength)
+ {
+ *olength = length;
+ }
return results;
}