Skip to contentSkip to conversation

dev-mornfall-nix - toolcontext: Deal with NULL cmd->filter gracefully.

PATCH Petr Rockai 1 participant 1 message May 27, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0e3a2d44241d3b688714025f862700ad2dfdcf69
Commit:        0e3a2d44241d3b688714025f862700ad2dfdcf69
Parent:        b71acdcdaf36f0456ae20f7b014bdcfe5f70a590
Author:        Petr Rockai <[email protected]>
AuthorDate:    Mon May 27 02:13:23 2013 +0200
Committer:     Petr Rockai <[email protected]>
CommitterDate: Mon May 27 02:13:23 2013 +0200

toolcontext: Deal with NULL cmd->filter gracefully.

---
 lib/commands/toolcontext.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/commands/toolcontext.c +1 -1
index 3b0d96e..af1aa63 100644
@@ -1652,7 +1652,7 @@ void destroy_toolcontext(struct cmd_context *cmd)
 	struct dm_config_tree *cft_cmdline;
 	FILE *new_stream;
 
-	if (cmd->dump_filter && cmd->filter->dump)
+	if (cmd->dump_filter && cmd->filter && cmd->filter->dump)
 		cmd->filter->dump(cmd->filter);
 
 	archive_exit(cmd);