aboutsummaryrefslogtreecommitdiffstats
path: root/g10/photoid.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/photoid.c')
-rw-r--r--g10/photoid.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/g10/photoid.c b/g10/photoid.c
index f9720d329..81ea7a0ca 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -341,6 +341,11 @@ show_photos (ctrl_t ctrl, const struct user_attribute *attrs, int count,
command=pct_expando(opt.photo_viewer,&args);
if(!command)
goto fail;
+ if (!*command)
+ {
+ xfree (command);
+ goto fail;
+ }
name=xmalloc(16+strlen(EXTSEP_S)+
strlen(image_type_to_string(args.imagetype,0))+1);