[glom] Avoid a null shared_ptr dereference.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Avoid a null shared_ptr dereference.
- Date: Mon, 7 Nov 2016 12:21:06 +0000 (UTC)
commit 61a749a9e12453bb92bb6e9b4dc8fd37effadd71
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Nov 7 13:17:11 2016 +0100
Avoid a null shared_ptr dereference.
Found by clang-tidy.
glom/mode_data/db_adddel/db_adddel.cc | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/glom/mode_data/db_adddel/db_adddel.cc b/glom/mode_data/db_adddel/db_adddel.cc
index c558094..a1a5c0b 100644
--- a/glom/mode_data/db_adddel/db_adddel.cc
+++ b/glom/mode_data/db_adddel/db_adddel.cc
@@ -425,6 +425,10 @@ bool DbAddDel::select_item(const Gtk::TreeModel::iterator& iter, bool start_edit
break;
}
+ if (!layout_item) {
+ return;
+ }
+
return select_item(iter, *layout_item, start_editing);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]