[gnome-sound-recorder] fix crash on close app without record
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-sound-recorder] fix crash on close app without record
- Date: Sat, 6 Jun 2020 07:05:06 +0000 (UTC)
commit c9f308ccedf526c79fd209a2af464e8fb8988ef9
Author: Kavan Mevada <kavanmevada gmail com>
Date: Sat Jun 6 11:47:13 2020 +0530
fix crash on close app without record
src/recorder.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/recorder.js b/src/recorder.js
index ae5b2d2..7489a64 100644
--- a/src/recorder.js
+++ b/src/recorder.js
@@ -151,7 +151,7 @@ var Recorder = new GObject.registerClass({
this.recordBus = null;
}
- return new Recording(this.file);
+ return this.file ? new Recording(this.file) : null;
}
_onMessageReceived(message) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]