Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/button.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-05-06 17:32:54 (GMT)
committer Daniel Drake <dsd@laptop.org>2011-05-06 19:04:03 (GMT)
commitecc8ede82ef594a7186e7e597ee9ded823616e59 (patch)
tree02d8fbb6881b6945e67a845778324faf991342fb /button.py
parentbb0772a2e8f1e4bccf80a44e8f4afc4f2045c576 (diff)
Fix audio recording when no camera present (SL#2691)
Introduce the relevant code catches to allow audio recording when no camera is present. Still has some rough edges but is now usable at least.
Diffstat (limited to 'button.py')
-rw-r--r--button.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/button.py b/button.py
index e3bcdc6..66cf80b 100644
--- a/button.py
+++ b/button.py
@@ -53,7 +53,8 @@ class RecdButton(TrayButton):
path = 'object-audio.svg'
pixbuf = utils.load_colored_svg(path, self._recd.colorStroke, self._recd.colorFill)
- ipb.composite(pixbuf, 8, 8, ipb.get_width(), ipb.get_height(), 8, 8, 1, 1, gtk.gdk.INTERP_BILINEAR, 255)
+ if ipb:
+ ipb.composite(pixbuf, 8, 8, ipb.get_width(), ipb.get_height(), 8, 8, 1, 1, gtk.gdk.INTERP_BILINEAR, 255)
img.set_from_pixbuf(pixbuf)
img.show()
return img