[banshee] AudioCdService: Throw an exception if no HardwareManager is available
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] AudioCdService: Throw an exception if no HardwareManager is available
- Date: Thu, 18 Aug 2011 22:13:10 +0000 (UTC)
commit 7cbb78f024f5d6ca2ba3c0b5aeec27da91747930
Author: Andres G. Aragoneses <knocte gmail com>
Date: Thu Aug 18 23:40:51 2011 +0200
AudioCdService: Throw an exception if no HardwareManager is available
This avoid a cryptic NRE later on when HardwareManager is null.
Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>
.../Banshee.AudioCd/AudioCdService.cs | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdService.cs b/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdService.cs
index af27237..10bbbc4 100644
--- a/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdService.cs
+++ b/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdService.cs
@@ -54,6 +54,10 @@ namespace Banshee.AudioCd
public void Initialize ()
{
+ if (ServiceManager.HardwareManager == null) {
+ throw new NotSupportedException ("AudioCdService cannot work when no HardwareManager is available");
+ }
+
lock (this) {
InstallPreferences ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]