diff --git a/js/ui/screencast.js b/js/ui/screencast.js index d1ccc5be7..def5dc9fa 100644 --- a/js/ui/screencast.js +++ b/js/ui/screencast.js @@ -117,6 +117,8 @@ const ScreencastService = new Lang.Class({ this._applyOptionalParameters(recorder, options); let [success, fileName] = recorder.record(); returnValue = [success, fileName ? fileName : '']; + if (!success) + this._stopRecordingForSender(sender); } invocation.return_value(GLib.Variant.new('(bs)', returnValue)); @@ -150,6 +152,8 @@ const ScreencastService = new Lang.Class({ this._applyOptionalParameters(recorder, options); let [success, fileName] = recorder.record(); returnValue = [success, fileName ? fileName : '']; + if (!success) + this._stopRecordingForSender(sender); } invocation.return_value(GLib.Variant.new('(bs)', returnValue));