Whenever you switch the canvas (eg, by changing OpenGL mode), accessing the pop-up palette crashes. This might also work for OSX users who can access the pop-up palette, but not the brushHud feature.
Apparently, this is caused by the brushHud object being referenced by KisPopupPalette. m_brushHud is destroyed instead of having its parent updated as well during the popup palette setParent call while setting the new canvas. (I don't entirely know why this only happens on OSX...)
So I just override the setParent function in QWidget for KisPopupPalette and set m_brushHud's new parent object as well.
Sorry about removing the extra spaces; feel free to revert those changes.