From dd9f6de62f5e7a64440fc5164b307ce91ec93925 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Sun, 22 Jun 2014 11:13:01 -0400 Subject: [PATCH] colmgr: Don't list NULL libraries This leads to a segmentation fault... Signed-off-by: Anna Schumaker --- lib/colmgr.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/colmgr.cpp b/lib/colmgr.cpp index 5bcc7e95..9784c97b 100644 --- a/lib/colmgr.cpp +++ b/lib/colmgr.cpp @@ -36,7 +36,11 @@ static Library *find_library(const Gtk::TreeModel::Row &row) static void list_path(Library *lib) { - Gtk::TreeModel::Row row = *(c_list->append()); + Gtk::TreeModel::Row row; + + if (!lib) + return; + row = *(c_list->append()); row[c_cols.c_id] = lib->id; row[c_cols.c_enabled] = lib->enabled;