GUI: crash after deletion of sample

How to get a crash:

  1. open new project
  2. go to Samples view
  3. create (or add from library) sample with at least one layer
  4. delete it
  5. got to another view
  6. go back to Samples -- > CRASH