diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2015-11-11 12:13:36 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2015-11-11 12:13:36 +0000 |
commit | c374d646a1da74ebb559cfcb89dc73932092e7f9 (patch) | |
tree | cbe9bb6565c965b4fb94d1e3fa237ce681f8eab6 /navigator.c | |
parent | 3ee4d23ffca8b0785c30cf6593babaaec1e6e1eb (diff) | |
download | imv-c374d646a1da74ebb559cfcb89dc73932092e7f9.tar.gz |
Skip adding unsupported filetypes
Diffstat (limited to 'navigator.c')
-rw-r--r-- | navigator.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/navigator.c b/navigator.c index a01435f..ccfeb51 100644 --- a/navigator.c +++ b/navigator.c @@ -45,8 +45,14 @@ void imv_destroy_navigator(struct imv_navigator *nav) nav->num_paths = 0; } +int imv_can_load_image(const char* path); + static void add_item(struct imv_navigator *nav, const char *path) { + if(!imv_can_load_image(path)) { + return; + } + if(nav->buf_size == nav->num_paths) { int new_buf_size = nav->buf_size * 2; char **new_paths = malloc(sizeof(char*) * new_buf_size); |