Closed ghost closed 2 years ago
If ScreenInteractive is not in a .Loop() and .PostEvent() is called it will cause a segfault:
ScreenInteractive
.Loop()
.PostEvent()
#include "ftxui/component/event.hpp" #include "ftxui/component/screen_interactive.hpp" int main(void) { auto screen = ftxui::ScreenInteractive::TerminalOutput(); screen.PostEvent(ftxui::Event::Custom); }
./ftxui-starter Segmentation fault (core dumped)
Can this be changed so that PostEvent() does nothing when screen is not active?
PostEvent()
screen
Made PR to fix this here.
Thanks! PR merged.
If
ScreenInteractive
is not in a.Loop()
and.PostEvent()
is called it will cause a segfault:Can this be changed so that
PostEvent()
does nothing whenscreen
is not active?