[glom] Added a g_return_if_fail check for invalid URLs
- From: Michael Hasselmann <mikhas src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom] Added a g_return_if_fail check for invalid URLs
- Date: Wed, 27 Jan 2010 14:41:05 +0000 (UTC)
commit 9af3b65567e7b861a5115c54bac043478f0b5625
Author: Michael Hasselmann <michaelh openismus com>
Date: Wed Jan 27 15:35:08 2010 +0100
Added a g_return_if_fail check for invalid URLs
* glom/import_csv/csv_parser.cc: Do not start the async reading if the file
object is invalid.
glom/import_csv/csv_parser.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glom/import_csv/csv_parser.cc b/glom/import_csv/csv_parser.cc
index 82777d5..3e48785 100644
--- a/glom/import_csv/csv_parser.cc
+++ b/glom/import_csv/csv_parser.cc
@@ -70,6 +70,8 @@ void CsvParser::set_file_and_start_parsing(const std::string& file_uri)
g_return_if_fail(!file_uri.empty());
m_file = Gio::File::create_for_uri(file_uri);
+ g_return_if_fail(m_file->query_exists());
+
m_file->read_async(sigc::mem_fun(*this, &CsvParser::on_file_read));
set_state(CsvParser::STATE_PARSING);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]