Blob Blame History Raw
From 461fb6c873d1b2f67149d8e59546bb754cde09c4 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Mon, 19 Mar 2012 19:09:37 -0400
Subject: [PATCH] Avoid a code generation problem

For some reason vala generates bad code with parameters shadowing
statics when the parameter name is the same as the member variable.
The concrete effect is

** (cheese:3628): CRITICAL **: cheese_main_window_finish_countdown_callback: assertion `self != NULL' failed

making it impossible to take any photos.
---
 src/cheese-countdown.vala |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cheese-countdown.vala b/src/cheese-countdown.vala
index 81b9059..a04197a 100644
--- a/src/cheese-countdown.vala
+++ b/src/cheese-countdown.vala
@@ -80,11 +80,11 @@ internal class Cheese.Countdown : GLib.Object
   /**
    * Start the countdown, using the countdown-duration GSetting for the time.
    *
-   * @param completed_callback the callback to call upon countdown completion
+   * @param cc the callback to call upon countdown completion
    */
-  public void start (CountdownCallback completed_callback)
+  public void start (CountdownCallback cc)
   {
-    this.completed_callback = completed_callback;
+    this.completed_callback = cc;
     this.current_value = settings.get_int("countdown-duration");
     running = true;
     countdown_actor.show ();
-- 
1.7.9.3