diff options
author | Erik Reckase <e.reckase@gmail.com> | 2010-11-18 04:16:25 +0000 |
---|---|---|
committer | Scott Draves <spot@draves.org> | 2015-02-15 12:20:13 -0500 |
commit | 26f5c53f097f58cbd11e00c30c31e1dfec3ece7b (patch) | |
tree | ba0bdfde87b705ad6bbe8c65941ef854484b4916 /src/parser.c | |
parent | ac95d6e4736aaf8a5b19f11004621e858e16e3a8 (diff) | |
download | pucket-26f5c53f097f58cbd11e00c30c31e1dfec3ece7b.tar.gz pucket-26f5c53f097f58cbd11e00c30c31e1dfec3ece7b.tar.bz2 pucket-26f5c53f097f58cbd11e00c30c31e1dfec3ece7b.zip |
removed all exit() calls from functions compiled into shared library. palette failures result in white palettes, smooth interpolation falls back to linear instead of exiting on first/last segments, etc.
git-svn-id: https://flam3.googlecode.com/svn/trunk@35 77852712-ef1d-11de-8684-7d64432d61a3
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/parser.c b/src/parser.c index e28669a..a36b6cb 100644 --- a/src/parser.c +++ b/src/parser.c @@ -253,9 +253,11 @@ void scan_for_flame_nodes(xmlNode *cur_node, char *parent_file, int default_flag /* Clear out the realloc'd memory */ memset(&(genome_storage[*all_ncps]),0,sizeof(flam3_genome)); - if (loc_current_cp.palette_index != flam3_palette_random) { - flam3_get_palette(loc_current_cp.palette_index, loc_current_cp.palette, + if (loc_current_cp.palette_index != -1) { + col_success = flam3_get_palette(loc_current_cp.palette_index, loc_current_cp.palette, loc_current_cp.hue_rotation); + if (col_success < 0) + fprintf(stderr,"error retrieving palette %d, setting to all white\n",loc_current_cp.palette_index); } col_success = flam3_interp_missing_colors(&loc_current_cp); |