Cycling74 / min-api

High-level C++-language application programming interface for Max
MIT License
58 stars 23 forks source link

Fix for dict constructor #133

Closed pixsperdavid closed 5 years ago

pixsperdavid commented 5 years ago

Fixes dict constructor when using pre-existing dictionary.

tap commented 5 years ago

Hi David!

This is a curious case. It should be that if the dictionary existed that it would be properly referenced by the call auto d = max::dictobj_findregistered_retain(name);. So this else clause, if I understand correctly, should not be necessary.

If you have an example of the bug that you can share with me I'd be happy to look at it. I'd like to do that before merging this PR.

Thanks!

pixsperdavid commented 5 years ago

Hi Tim!

The issue I have is that if a dictionary is found for the symbol, (d is not null), m_instance is never assigned to d. Therefore none of the dict object's methods work.

tap commented 5 years ago

Ah! That makes total sense! I need more coffee ;-)