Skip to content

Commit

Permalink
Fix invalid optional access with --no-pen flag
Browse files Browse the repository at this point in the history
  • Loading branch information
matteodelabre committed Apr 24, 2021
1 parent 93fea07 commit 48a4e5a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ auto client::event_loop() -> bool
handle_status(this->pen_handler->process_events());
}

bool inhibit = this->pen_handler->is_inhibiting();
bool inhibit = this->pen_handler.has_value()
&& this->pen_handler->is_inhibiting();

if (this->buttons_handler.has_value()
// NOLINTNEXTLINE(hicpp-signed-bitwise): Use of C library
Expand Down

0 comments on commit 48a4e5a

Please sign in to comment.