[cheese] Do not crash if gnome-video-effects is not present
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Do not crash if gnome-video-effects is not present
- Date: Sun, 16 Oct 2011 05:34:44 +0000 (UTC)
commit 554e81eb22467b5f2a2f8aa649850b443ffd2d0b
Author: David King <amigadave amigadave com>
Date: Tue Oct 4 11:51:32 2011 +0200
Do not crash if gnome-video-effects is not present
Also, print a warning using warning(). Fixes bug 654671.
src/cheese-window.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 5824d30..d0c8bb5 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -955,11 +955,14 @@ public class Cheese.MainWindow : Gtk.Window
effects_manager = new EffectsManager ();
effects_manager.load_effects ();
+ /* Must initialize effects_grids before returning, as it is dereferenced later, bug 654671. */
+ effects_grids = new ArrayList<Clutter.Box> ();
+
if (effects_manager.effects.size == 0)
{
+ warning ("gnome-video-effects is not installed.");
return;
}
- effects_grids = new ArrayList<Clutter.Box> ();
for (int i = 0; i <= effects_manager.effects.size / EFFECTS_PER_PAGE; i++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]