summaryrefslogtreecommitdiff
path: root/src/parser.c
diff options
context:
space:
mode:
authorErik Reckase <e.reckase@gmail.com>2010-11-18 04:16:25 +0000
committerScott Draves <spot@draves.org>2015-02-15 12:20:13 -0500
commit26f5c53f097f58cbd11e00c30c31e1dfec3ece7b (patch)
treeba0bdfde87b705ad6bbe8c65941ef854484b4916 /src/parser.c
parentac95d6e4736aaf8a5b19f11004621e858e16e3a8 (diff)
downloadpucket-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.c6
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);