diff options
author | Jannis Pohlmann <jannis@xfce.org> | 2009-05-21 03:12:28 +0200 |
---|---|---|
committer | Jannis Pohlmann <jannis@xfce.org> | 2009-05-21 03:12:28 +0200 |
commit | df5098a4173fbc8fba0988169ed949c5b8df90a1 (patch) | |
tree | 8f34755d8333caf045d196c9ec0959592782e186 /tumbler/tumbler-thumbnailer.c | |
parent | 872604a7f03e626883915bda32c4d879a5753e98 (diff) | |
download | tumbler-df5098a4173fbc8fba0988169ed949c5b8df90a1.tar.gz |
Fix last element not being copied in tumbler_thumbnailer_array_copy().
Diffstat (limited to 'tumbler/tumbler-thumbnailer.c')
-rw-r--r-- | tumbler/tumbler-thumbnailer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tumbler/tumbler-thumbnailer.c b/tumbler/tumbler-thumbnailer.c index e428cd9..d3d39eb 100644 --- a/tumbler/tumbler-thumbnailer.c +++ b/tumbler/tumbler-thumbnailer.c @@ -198,13 +198,13 @@ tumbler_thumbnailer_array_copy (TumblerThumbnailer **thumbnailers) for (length = 0; thumbnailers[length] != NULL; ++length); - copy = g_new0 (TumblerThumbnailer *, length); + copy = g_new0 (TumblerThumbnailer *, length+1); - for (n = 0; n < length-1; ++n) + for (n = 0; n < length; ++n) if (thumbnailers[n] != NULL) copy[n] = g_object_ref (thumbnailers[n]); - copy[length-1] = NULL; + copy[n] = NULL; return copy; } |