Fix heap-buffer-overrun in PropertiesWidget::displayFilesListMenu

This is a fix for #1978.