[glom/glom-1-30] utils_ui: Don't crash when showing error.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-30] utils_ui: Don't crash when showing error.
- Date: Mon, 16 May 2016 18:58:08 +0000 (UTC)
commit 14d914bc56a4d6f3c43c43901e95369de44a62a2
Author: Murray Cumming <murrayc murrayc com>
Date: Mon May 16 19:13:16 2016 +0200
utils_ui: Don't crash when showing error.
glom/utils_ui.cc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/glom/utils_ui.cc b/glom/utils_ui.cc
index ee4cd06..1bc5358 100644
--- a/glom/utils_ui.cc
+++ b/glom/utils_ui.cc
@@ -66,7 +66,12 @@ static void on_css_parsing_error(const Glib::RefPtr<const Gtk::CssSection>& sect
if(section)
{
- std::cerr << " URI = " << section->get_file()->get_uri() << std::endl;
+ const auto file = section->get_file();
+ if (file)
+ {
+ std::cerr << " URI = " << section->get_file()->get_uri() << std::endl;
+ }
+
std::cerr << " start_line = " << section->get_start_line()+1
<< ", end_line = " << section->get_end_line()+1 << std::endl;
std::cerr << " start_position = " << section->get_start_position()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]