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:
parent
8aea84e20c
commit
f8ae98894f
1 changed files with 6 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue