summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGaël Bonithon <gael@xfce.org>2021-12-10 12:05:04 +0100
committerGaël Bonithon <gael@xfce.org>2021-12-11 07:42:49 +0100
commit11574c22e9f1e56d2d64860e40f1582e3c82655a (patch)
tree27ef4aeab04022c6b6d120652d528cde86a0b9fe /plugins
parent327d0f6b2e6c61f55ec688dde7ce558d58ea3a19 (diff)
downloadtumbler-11574c22e9f1e56d2d64860e40f1582e3c82655a.tar.gz
Fix warnings from scan-build (Clang 13.0)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c2
-rw-r--r--plugins/jpeg-thumbnailer/jpeg-thumbnailer.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c
index 6bc9de3..8ada5ef 100644
--- a/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c
+++ b/plugins/ffmpeg-thumbnailer/ffmpeg-thumbnailer.c
@@ -247,6 +247,8 @@ ffmpeg_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer,
if (v_stream == NULL)
{
/* there was an error, emit error signal */
+ g_set_error (&error, TUMBLER_ERROR, TUMBLER_ERROR_INVALID_FORMAT,
+ _("Thumbnail could not be inferred from file contents"));
g_signal_emit_by_name (thumbnailer, "error", uri, error->code, error->message);
g_error_free (error);
diff --git a/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c b/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c
index 74061cb..52ed3e1 100644
--- a/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c
+++ b/plugins/jpeg-thumbnailer/jpeg-thumbnailer.c
@@ -342,7 +342,7 @@ tvtj_jpeg_load (const JOCTET *content,
jpeg_read_scanlines (&cinfo, lines, 1);
/* convert the data to RGB */
- if (cinfo.num_components == 1)
+ if (cinfo.num_components == 1 && buffer != NULL)
{
for (n = 0; n < cinfo.output_width; ++n)
{