add some strategic lua gc steps.
[ardour.git] / gtk2_ardour / processor_box.cc
index ee7cfa8dffb1212d7a24b5f65964fcd43b550bda..c01d9e497cc976551a2ae5652f86d7e9e4b29224 100644 (file)
@@ -86,7 +86,7 @@
 #include "tooltips.h"
 #include "new_plugin_preset_dialog.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 #ifdef AUDIOUNIT_SUPPORT
 class AUPluginUI;
@@ -1723,6 +1723,7 @@ ProcessorEntry::LuaPluginDisplay::render_inline (cairo_t *cr, uint32_t width)
        Cairo::Context ctx (cr);
        try {
                luabridge::LuaRef rv = (*_lua_render_inline)((Cairo::Context *)&ctx, width, _max_height);
+               lua_gui.collect_garbage_step ();
                if (rv.isTable ()) {
                        uint32_t h = rv[2];
                        return h;
@@ -2496,7 +2497,7 @@ ProcessorBox::choose_send ()
        boost::shared_ptr<Send> send (new Send (*_session, _route->pannable (), _route->mute_master()));
 
        /* make an educated guess at the initial number of outputs for the send */
-       ChanCount outs = (_session->master_out())
+       ChanCount outs = (_route->n_outputs().n_audio() && _session->master_out())
                        ? _session->master_out()->n_outputs()
                        : _route->n_outputs();