From 0c16a2c8372d9471e88ab67db4a2cbe446b73837 Mon Sep 17 00:00:00 2001
From: Nick Foster <nick@nerdnetworks.org>
Date: Wed, 28 Jul 2010 10:11:01 -0700
Subject: usrp: gain group should not try to set gain elements if there are
 none

---
 host/lib/gain_group.cpp | 1 +
 1 file changed, 1 insertion(+)

(limited to 'host/lib')

diff --git a/host/lib/gain_group.cpp b/host/lib/gain_group.cpp
index 3ae9a285e..5a14fa96f 100644
--- a/host/lib/gain_group.cpp
+++ b/host/lib/gain_group.cpp
@@ -70,6 +70,7 @@ public:
 
     void set_value(float gain){
         std::vector<gain_fcns_t> all_fcns = get_all_fcns();
+        if (all_fcns.size() == 0) return; //nothing to set!
 
         //get the max step size among the gains
         float max_step = 0;
-- 
cgit v1.2.3