Commit 480c0663 authored by afdw's avatar afdw Committed by Alexander Schwinn

Add checks for 0 handles (Bug #14122)


(cherry picked from commit 98394ef9)
parent 28e5098d
...@@ -356,8 +356,15 @@ thunar_thumbnailer_queue_async_reply (GObject *proxy, ...@@ -356,8 +356,15 @@ thunar_thumbnailer_queue_async_reply (GObject *proxy,
} }
else if (error == NULL) else if (error == NULL)
{ {
/* store the handle returned by tumbler */ if (handle == 0)
job->handle = handle; {
g_printerr ("ThunarThumbnailer: got 0 handle (Queue)\n");
}
else
{
/* store the handle returned by tumbler */
job->handle = handle;
}
} }
else else
{ {
...@@ -871,6 +878,12 @@ thunar_thumbnailer_thumbnailer_finished (GDBusProxy *proxy, ...@@ -871,6 +878,12 @@ thunar_thumbnailer_thumbnailer_finished (GDBusProxy *proxy,
_thunar_return_if_fail (G_IS_DBUS_PROXY (proxy)); _thunar_return_if_fail (G_IS_DBUS_PROXY (proxy));
_thunar_return_if_fail (THUNAR_IS_THUMBNAILER (thumbnailer)); _thunar_return_if_fail (THUNAR_IS_THUMBNAILER (thumbnailer));
if (handle == 0)
{
g_printerr ("ThunarThumbnailer: got 0 handle (Finished)\n");
return;
}
_thumbnailer_lock (thumbnailer); _thumbnailer_lock (thumbnailer);
for (lp = thumbnailer->jobs; lp != NULL; lp = lp->next) for (lp = thumbnailer->jobs; lp != NULL; lp = lp->next)
...@@ -912,6 +925,12 @@ thunar_thumbnailer_idle (ThunarThumbnailer *thumbnailer, ...@@ -912,6 +925,12 @@ thunar_thumbnailer_idle (ThunarThumbnailer *thumbnailer,
if (G_UNLIKELY (uris == NULL)) if (G_UNLIKELY (uris == NULL))
return; return;
if (handle == 0)
{
g_printerr ("ThunarThumbnailer: got 0 handle (Error or Ready)\n");
return;
}
_thumbnailer_lock (thumbnailer); _thumbnailer_lock (thumbnailer);
/* look for the job so we don't emit unknown handles, the reason /* look for the job so we don't emit unknown handles, the reason
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment