colmgr: Don't list NULL libraries

This leads to a segmentation fault...

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2014-06-22 11:13:01 -04:00
parent 8c7b1a9a27
commit dd9f6de62f
1 changed files with 5 additions and 1 deletions

View File

@ -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;