[gnome-commander/cherry-pick-b295dda6] Merge branch 'ctrl-left-segv-fix-with-no-active-file' into 'gcmd-1-12'
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/cherry-pick-b295dda6] Merge branch 'ctrl-left-segv-fix-with-no-active-file' into 'gcmd-1-12'
- Date: Tue, 11 May 2021 19:36:11 +0000 (UTC)
commit 28d28cfd6177cda48b1a6fbd736d0ecba4c99cd5
Author: Uwe Scholz <u scholz83 gmx de>
Date: Tue May 11 19:35:16 2021 +0000
Merge branch 'ctrl-left-segv-fix-with-no-active-file' into 'gcmd-1-12'
set_fs_directory_to_opposite: Fix segv when no directory is chosen
See merge request GNOME/gnome-commander!12
(cherry picked from commit b295dda6fbd676800a7c186504f24f9e98aebe93)
d8c97aad set_fs_directory_to_opposite: Fix segv when no directory is chosen
src/gnome-cmd-main-win.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 783b1da2..0d024754 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -1253,7 +1253,7 @@ void GnomeCmdMainWin::set_fs_directory_to_opposite(FileSelectorID fsID)
{
GnomeCmdFile *file = other->file_list()->get_selected_file();
- if (file->GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) == G_FILE_TYPE_DIRECTORY)
+ if (file && (file->GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) == G_FILE_TYPE_DIRECTORY))
dir = GNOME_CMD_IS_DIR (file) ? GNOME_CMD_DIR (file) : gnome_cmd_dir_new_from_info (file->info,
dir);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]