[logs] fix NPE when no log is selected