fix: check first before derefering it
This commit is contained in:
committed by
Raphael Coeffic
parent
cc41043883
commit
6cb2e332e1
+2
-1
@@ -312,7 +312,8 @@ void FormGroup::setFocus(uint8_t flag, Window * from)
|
|||||||
case SET_FOCUS_FORWARD:
|
case SET_FOCUS_FORWARD:
|
||||||
if (from && from->isChild(this)) {
|
if (from && from->isChild(this)) {
|
||||||
if (next == this) {
|
if (next == this) {
|
||||||
first->setFocus(SET_FOCUS_FORWARD, this);
|
if (first)
|
||||||
|
first->setFocus(SET_FOCUS_FORWARD, this);
|
||||||
}
|
}
|
||||||
else if (next) {
|
else if (next) {
|
||||||
next->setFocus(SET_FOCUS_FORWARD, this);
|
next->setFocus(SET_FOCUS_FORWARD, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user