summaryrefslogtreecommitdiff
path: root/test-tree-magic.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2012-01-17 16:26:50 +0000
committerBastien Nocera <hadess@hadess.net>2012-01-17 16:27:12 +0000
commitf51d07c296f456886574db45ba07f7c76984adf3 (patch)
tree6d8ef6359378a574dfbc07e4204b8f8226bae4f8 /test-tree-magic.c
parent21b73e824f0f1727e73bc972a0d2c03cff850fff (diff)
Fix compile-time warning
Diffstat (limited to 'test-tree-magic.c')
-rw-r--r--test-tree-magic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test-tree-magic.c b/test-tree-magic.c
index 92394bd..9b4dfaf 100644
--- a/test-tree-magic.c
+++ b/test-tree-magic.c
@@ -167,6 +167,8 @@ insert_matchlet (TreeMatch *match,
TreeMatchlet *matchlet,
gint depth)
{
+ g_return_if_fail (match != NULL);
+
if (depth == 0)
match->matches = g_list_append (match->matches, matchlet);
else {
@@ -209,6 +211,7 @@ read_tree_magic_from_directory (const gchar *prefix)
gint depth;
filename = g_build_filename (prefix, "mime", "treemagic", NULL);
+ match = NULL;
if (g_file_get_contents (filename, &text, &len, NULL)) {
if (strcmp (text, "MIME-TreeMagic") == 0) {