diff command.c @ 35204:4a62631ecadd

Do not assume that a stream is available for capture.
author reimar
date Tue, 30 Oct 2012 18:00:52 +0000
parents 95ad1e516f03
children 8b8e20725b24
line wrap: on
line diff
--- a/command.c	Tue Oct 30 17:47:18 2012 +0000
+++ b/command.c	Tue Oct 30 18:00:52 2012 +0000
@@ -1115,7 +1115,7 @@
                                void *arg, MPContext *mpctx)
 {
     int ret;
-    int capturing = !!mpctx->stream->capture_file;
+    int capturing = mpctx->stream && mpctx->stream->capture_file;
 
     if (!mpctx->stream)
         return M_PROPERTY_UNAVAILABLE;