filemanager: Add assertion checks to prevent dereferencing ptrs

* clang static analysis shows gaps where these calls could
  rereferencce pointers. Perform an assertion check.
This commit is contained in:
Alexander von Gluck IV 2013-09-24 18:46:53 -05:00
parent dfe505522c
commit b4b58f54b6
2 changed files with 4 additions and 0 deletions

View File

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

View File

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