]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix problem with trying to access non-existent hash key "subtitle_scan"
authorjstebbins <jstebbins.hb@gmail.com>
Sun, 19 Jul 2009 18:38:28 +0000 (18:38 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
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://svn.handbrake.fr/HandBrake/trunk@2716 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c

index cfd12dac6a701ac0b164ed6e36d3238baa437285..63257eed665974882c22b57e6455735a60dcbbae 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++)
        {