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:
		| @@ -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; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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 */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user