I have a documentwindow subclass which is working fine with other simple application and working fine on windows application very well, but on mac when mouse event occurs it crashes. In juce_component class it is crashing at.
const Component* const topLevelComp = target->getTopLevelComponent();
ComponentPeer* peer = topLevelComp->getPeer();
if (topLevelComp->isOnDesktop()) p = peer->globalToLocal (p); else p = convertFromParentSpace (*topLevelComp, p); if (topLevelComp == target) return p;
where it is not getting its component peer.
Please guide me what am i doing wrong, what changes should be done on mac build since it is working on windows.