gui: MainWindow: crash fix

checking if path is not null
TODO update