Skip to content

Commit 6e476b0

Browse files
committed
fix allocation of faust class
1 parent a79e74f commit 6e476b0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/DEINDUGens/JPverbRaw.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,9 @@ void Faust_next_clear(Faust* unit, int inNumSamples)
15271527
void Faust_Ctor(Faust* unit) // module constructor
15281528
{
15291529
// allocate dsp
1530-
unit->mDSP = new(RTAlloc(unit->mWorld, sizeof(FAUSTCLASS))) FAUSTCLASS();
1530+
void* mem = RTAlloc(unit->mWorld, sizeof(FAUSTCLASS));
1531+
ClearUnitIfMemFailed(mem);
1532+
unit->mDSP = new (mem) FAUSTCLASS();
15311533
if (!unit->mDSP) {
15321534
Print("Faust[%s]: RT memory allocation failed, try increasing the real-time memory size in the server options\n", g_unitName);
15331535
goto end;

0 commit comments

Comments
 (0)