1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-05 03:50:07 +00:00

Added extra nullptr checks in Android windowing code which fixes rare crashes when callbacks occur before the Component peer has been fully constructed

This commit is contained in:
hogliux 2017-04-05 19:14:49 +01:00
parent 8aea84e20c
commit f8ae98894f

View file

@ -438,12 +438,16 @@ public:
//==============================================================================
bool isFocused() const override
{
return view.callBooleanMethod (ComponentPeerView.hasFocus);
if (view != nullptr)
return view.callBooleanMethod (ComponentPeerView.hasFocus);
return false;
}
void grabFocus() override
{
view.callBooleanMethod (ComponentPeerView.requestFocus);
if (view != nullptr)
view.callBooleanMethod (ComponentPeerView.requestFocus);
}
void handleFocusChangeCallback (bool hasFocus)