Merge pull request #29 from kallisti5/master

filemanager: Add assertion checks to prevent dereferencing ptrs
This commit is contained in:
Stefano Karapetsas 2013-09-26 01:29:31 -07:00
commit a43a1d9f36
3 changed files with 5 additions and 0 deletions

View File

@ -306,6 +306,7 @@ on_confirm_trash_changed (GSettings *settings,
PlumaFileBrowserPluginData *data; PlumaFileBrowserPluginData *data;
gboolean enable = FALSE; gboolean enable = FALSE;
data = (PlumaFileBrowserPluginData *)(user_data);
enable = g_settings_get_boolean (settings, key); enable = g_settings_get_boolean (settings, key);
data->confirm_trash = enable; data->confirm_trash = enable;

View File

@ -2480,6 +2480,8 @@ set_virtual_root_from_node (PlumaFileBrowserStore * model,
GSList *copy; GSList *copy;
GtkTreePath *empty = NULL; GtkTreePath *empty = NULL;
g_assert (node != NULL);
prev = node; prev = node;
next = prev->parent; next = prev->parent;

View File

@ -1640,6 +1640,8 @@ jump_to_location (PlumaFileBrowserWidget * obj, GList * item,
obj->priv->changing_location = TRUE; obj->priv->changing_location = TRUE;
g_assert (obj->priv->current_location != NULL);
loc = (Location *) (obj->priv->current_location->data); loc = (Location *) (obj->priv->current_location->data);
/* Set the new root + virtual root */ /* Set the new root + virtual root */