Using the [code example](https://gist.github.com/anaselli/1024bb6a94fa038df0b418aeb627ddc9) and commenting the line containing **dialog->pollEvent();** the application crashes in ncurses only