Amend f474d0d4a9, remove explicit casts
authorRobin Gareus <robin@gareus.org>
Wed, 27 Feb 2019 15:44:39 +0000 (16:44 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 27 Feb 2019 15:44:39 +0000 (16:44 +0100)
scripts/_vca_slave_assign.lua

index 558456ed0746af5620f78b291b6e75020630afaf..616c0abd987f0afd7391fc3c65585e664db697d6 100644 (file)
@@ -56,8 +56,8 @@ function factory () return function ()
        -- test if mst is already controlled by slv (directly or indirectly)
        -- if so, don't allow the connection
        if (not slv:to_slavable ():assigned_to (Session:vca_manager(), mst)) then
-               -- if slv is a VCA and is controlled by master, disconnect it
-               if (not slv:to_vca ():isnil () and slv:to_vca ():slaved_to (mst)) or (not slv:to_route ():isnil () and slv:to_route ():slaved_to (mst)) then
+               -- if slv controlled by master, disconnect it
+               if (slv:slaved_to (mst)) then
                        slv:to_slavable ():unassign (mst)
                else
                        slv:to_slavable ():assign (mst)