Cycling74 / min-devkit

Tools, documentation, and reference implementation of a Max Package built using the Min-API.
MIT License
158 stars 31 forks source link

Throwing in constructor crash #126

Closed louisHougi closed 4 years ago

louisHougi commented 5 years ago

Hey, I'm experiencing crash when I throw in my object constructor.

MyObject(const atoms& args = {}) 
{
if (args.empty())
   error("MyObject expects arguments")
}

I guess this happens because it leads to a throw during the construction of the dummy_instance of MyObject. Modifying: dummy_instance = std::make_unique<min_class_type>(std::nothrow); and providing the correct constructor is what I'm doing now. Best,

tap commented 4 years ago

Thanks for reporting this @louisHougi ! And also for providing the fix.

I will try to incorporate this in the next set of revisions.

tap commented 4 years ago

Closing this ticket here since it it tracked in the linked ticket above.