fix issue 1603 - NullPointerException on setTitle call#34
fix issue 1603 - NullPointerException on setTitle call#34flerda merged 1 commit intoflerda:v2.0.1-devfrom
Conversation
|
I think the problem is that setTitle is called before setContentView. This fixes it, but will probably leave the title not set correctly in those cases. |
|
Good insight! I replicated this behaviour. I moved the call right after setContentView and it seems it to work too, but I will leave the null check in Compat for good measure. |
|
The other places in the code where setTitle and setSubtitle are called seem safe (after setContentView) |
|
Thanks! |
Issue 1603: NullPointerException on setTitle call
Cause Card.getQuestion to reload the note.
I think the problem with this issue is that the command Activity.getActionBar() might return null even for the API levels that support action bar. This commit should guard from this case.