--- a/xsnap.c +++ b/xsnap.c @@ -2254,7 +2254,7 @@ if (op_mode == 0) exitXsnap (NULL, NULL, snap_pixmap, copy_gc); - if (!root_name) + if (*root_name == '\0') strcpy(output_name, "(stdout)"); if (op_mode == 2) {