Skip to content

Commit

Permalink
Merge pull request #415 from weefuzzy/fix/list2buf_error_format
Browse files Browse the repository at this point in the history
Fixes #414. Don't try and send `t_symbol` into `object_error`
  • Loading branch information
tremblap authored Feb 26, 2024
2 parents 30dc8b1 + 81f8afb commit b49c05e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions source/include/clients/nrt/FluidListToBuf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,11 @@ void FluidListToBuf_list(FluidListToBuf* x, t_symbol* /*s*/, long argc,
{
if(isr())
{
object_error((t_object*) x, "Internal buffer %s not initialised and called on high-priority thread. Either initialise object with size, or call on main thread", x->output->name());
object_error((t_object*) x,
"Internal buffer %s not initialised and called on "
"high-priority thread. Either initialise object with "
"size, or call on main thread",
x->output->name()->s_name);
return;
} else resizeAnyway = true;
}
Expand All @@ -221,7 +225,8 @@ void FluidListToBuf_list(FluidListToBuf* x, t_symbol* /*s*/, long argc,

if (!buf.exists())
{
object_error((t_object*) x, "Buffer %s not found", x->output->name());
object_error((t_object*) x, "Buffer %s not found",
x->output->name()->s_name);
return;
}

Expand All @@ -236,14 +241,16 @@ void FluidListToBuf_list(FluidListToBuf* x, t_symbol* /*s*/, long argc,
x->axis == 0 ? 1 : x->startChannel + argc,
x->output->sampleRate())
.ok())
object_error((t_object*) x, "Can't resize buffer %s", x->output->name());
object_error((t_object*) x, "Can't resize buffer %s",
x->output->name()->s_name);
else
count = argc;
}

if (!buf.valid())
{
object_error((t_object*) x, "Buffer %s not initialised", x->output->name());
object_error((t_object*) x, "Buffer %s not initialised",
x->output->name()->s_name);
return;
}

Expand Down

0 comments on commit b49c05e

Please sign in to comment.