aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/EventDispatcher.cpp3
-rw-r--r--common/EventRecorder.cpp8
2 files changed, 3 insertions, 8 deletions
diff --git a/common/EventDispatcher.cpp b/common/EventDispatcher.cpp
index a77c527969..d295cb9f81 100644
--- a/common/EventDispatcher.cpp
+++ b/common/EventDispatcher.cpp
@@ -72,8 +72,7 @@ void EventDispatcher::dispatch() {
}
void EventDispatcher::registerMapper(EventMapper *mapper) {
- if (_mapper)
- delete _mapper;
+ delete _mapper;
_mapper = mapper;
}
diff --git a/common/EventRecorder.cpp b/common/EventRecorder.cpp
index aea17d8f89..47ab3da3d6 100644
--- a/common/EventRecorder.cpp
+++ b/common/EventRecorder.cpp
@@ -203,12 +203,8 @@ void EventRecorder::deinit() {
g_system->unlockMutex(_timeMutex);
g_system->unlockMutex(_recorderMutex);
- if (_playbackFile != NULL) {
- delete _playbackFile;
- }
- if (_playbackTimeFile != NULL) {
- delete _playbackTimeFile;
- }
+ delete _playbackFile;
+ delete _playbackTimeFile;
if (_recordFile != NULL) {
_recordFile->finalize();