Notifications
Clear all

[Closed] Broadcast Notification C++

Hi, I am using the Broadcast notification system, and it works. But depending on which RegisterNotification is on, it will crash max the first time it is built, afterwards, it loads max fine. I can’t understand why it would crash max only the first time ??

Springboard::Springboard(){
  	RegisterNotification(TimeUnitsChanged, this, NOTIFY_TIMEUNITS_CHANGE);
  	RegisterNotification(UnitsChanged, this, NOTIFY_UNITS_CHANGE);
  }
  
  Springboard::~Springboard(){
  	UnRegisterNotification(TimeUnitsChanged, this, NOTIFY_TIMEUNITS_CHANGE);
  	UnRegisterNotification(UnitsChanged, this, NOTIFY_UNITS_CHANGE);
  }
  	

It only does this for certain notifications too, such as the Units Change and the Viewport Change. But other ones like TimeUnits change work fine all the time. Why is this ??