summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Schwinn <alexxcons@xfce.org>2020-11-30 23:50:29 +0100
committerAlexander Schwinn <alexxcons@xfce.org>2020-11-30 23:59:14 +0100
commitf98d415add84a4608b00bce61e2e438b2afe1182 (patch)
treee627e383daceea4a7ee6bd5fc0e81f4b5f00c13b
parent814294a3f34a4b0b23055e0d186eed39bc0ae1a9 (diff)
downloadthunar-f98d415add84a4608b00bce61e2e438b2afe1182.tar.gz
Prevent possible crash of thunar_launcher_poke (Issue #436)
Prevent crash if there is actually nothing to poke
-rw-r--r--thunar/thunar-launcher.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/thunar/thunar-launcher.c b/thunar/thunar-launcher.c
index e00cb72d..b51737b1 100644
--- a/thunar/thunar-launcher.c
+++ b/thunar/thunar-launcher.c
@@ -911,6 +911,12 @@ thunar_launcher_poke (ThunarLauncher *launcher,
_thunar_return_if_fail (THUNAR_IS_LAUNCHER (launcher));
+ if (launcher->files_to_process == NULL)
+ {
+ g_warning("No files to process. thunar_launcher_poke aborted.");
+ return;
+ }
+
poke_data = thunar_launcher_poke_data_new (launcher->files_to_process, application_to_use, folder_open_action);
if (launcher->device_to_process != NULL)