[gnome-dvb-daemon] gnomedvb: Check if return value of get_scanner_for_device is not None



commit 8bee4eaa8289eb1c68207f1eec5a41e52d0ea6af
Author: Sebastian Pölsterl <sebp k-d-w org>
Date:   Wed May 18 21:02:35 2011 +0200

    gnomedvb: Check if return value of get_scanner_for_device is not None

 client/gnomedvb/ui/wizard/pages/ChannelScanPage.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py b/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
index aab3390..259740b 100644
--- a/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
+++ b/client/gnomedvb/ui/wizard/pages/ChannelScanPage.py
@@ -169,6 +169,8 @@ class ChannelScanPage(BasePage):
                 self._scanner.destroy()
         
         self._scanner = self._model.get_scanner_for_device(adapter, frontend)
+        if self._scanner == None:
+            return
         
         self._scanner.connect ("frequency-scanned", self.__on_freq_scanned)
         self._scanner.connect ("channel-added", self.__on_channel_added)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]