OSDN Git Service

LinGui: fix problem with trying to access non-existent hash key "subtitle_scan"
authorjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 19 Jul 2009 18:38:28 +0000 (18:38 +0000)
committerjstebbins <jstebbins@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 19 Jul 2009 18:38:28 +0000 (18:38 +0000)
an invalid job sequence_id caused an attempt to access a value that
hadn't been set yet.

git-svn-id: svn://localhost/HandBrake/trunk@2716 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c

index cfd12da..63257ee 100644 (file)
@@ -2175,6 +2175,9 @@ find_queue_job(GValue *queue, gint unique_id, GValue **job)
        
        *job = NULL;
        g_debug("find_queue_job");
+       if (unique_id == 0)  // Invalid Id
+               return -1;
+
        count = ghb_array_len(queue);
        for (ii = 0; ii < count; ii++)
        {