File: dont-crash-on-null-job.patch

package info (click to toggle)
gvfs 1.30.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 22,580 kB
  • ctags: 12,211
  • sloc: ansic: 113,948; sh: 4,957; xml: 2,353; makefile: 1,601; python: 1,448; sed: 16
file content (25 lines) | stat: -rw-r--r-- 718 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Don't try to announce the finish of a NULL job.
Origin: vendor, Ubuntu
Bug-Ubuntu: LP #345754, #838464

--- a/daemon/gvfschannel.c
+++ b/daemon/gvfschannel.c
@@ -611,7 +611,8 @@
 
   job = channel->priv->current_job;
   channel->priv->current_job = NULL;
-  g_vfs_job_emit_finished (job);
+  if (job)
+    g_vfs_job_emit_finished (job);
 
   class = G_VFS_CHANNEL_GET_CLASS (channel);
   
@@ -632,7 +633,7 @@
     }
   /* Start queued request or readahead */
   else if (!start_queued_request (channel) &&
-	   class->readahead)
+	   class->readahead && job)
     {
       /* No queued requests, maybe we want to do a readahead call */
       channel->priv->current_job = class->readahead (channel, job);