summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 4c07b3a..226f058 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -308,11 +308,8 @@ bool VMemo::startRecording() {
recording = TRUE;
if (openDSP() == -1) {
recording = FALSE;
- msgLabel=0;
- delete msgLabel;
-
return FALSE;
}
config.setGroup("Defaults");
@@ -426,10 +423,14 @@ int VMemo::openDSP() {
dsp = open("/dev/dsp", O_RDONLY);
}
if(dsp == -1) {
- perror("open(\"/dev/dsp\")");
- errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno);
+ msgLabel->close();
+ msgLabel=0;
+ delete msgLabel;
+
+ perror("open(\"/dev/dsp\")");
+ errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno);
QMessageBox::critical(0, "vmemo", errorMsg, "Abort");
return -1;
}