summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index 6790d622a..8ce92c6d6 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -51,9 +51,7 @@ Logger::Logger():
Logger::~Logger()
{
if (mLogFile.is_open())
- {
mLogFile.close();
- }
}
void Logger::setLogFile(const std::string &logFilename)
@@ -209,7 +207,8 @@ void Logger::error(const std::string &error_text)
#elif defined __linux__ || __linux
std::cerr << "Error: " << error_text << std::endl;
std::string msg = "xmessage \"" + error_text + "\"";
- system(msg.c_str());
+ if (system(msg.c_str()) == -1)
+ std::cerr << "Error: " << error_text << std::endl;
#else
std::cerr << "Error: " << error_text << std::endl;
#endif