aboutsummaryrefslogtreecommitdiff
path: root/src/recorder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/recorder.cpp')
-rw-r--r--src/recorder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/recorder.cpp b/src/recorder.cpp
index 13e2b13..6859f1b 100644
--- a/src/recorder.cpp
+++ b/src/recorder.cpp
@@ -69,6 +69,11 @@ Recorder::start(const char *filename)
-1, 0, -1, -1, -1, -1 /* no audio */
};
+ if (!filename || !*filename) {
+ stop();
+ return;
+ }
+
lock();
SDL_FFMPEGFREE_SAFE(file);