Skip to content

Commit 22c7eef

Browse files
committed
return -1 in getFirstNotifyingFrame if there are no notifications
1 parent 183c857 commit 22c7eef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/OLEDDisplayUi.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ void OLEDDisplayUi::setFrameNotificationCallback(FrameNotificationCallback* fram
265265
}
266266

267267
uint32_t OLEDDisplayUi::getFirstNotifyingFrame() {
268+
if (this->state.notifyingFrames.size() == 0){
269+
return -1;
270+
}
268271
return this->state.notifyingFrames[0];
269272
}
270273

0 commit comments

Comments
 (0)