comparison src/layout.c @ 523:0717bcc4f2b7

Handle the case of reduction of the number of view directory types. Previously it was leading to a segfault.
author zas_
date Fri, 25 Apr 2008 08:07:22 +0000
parents 135570a8bd96
children bf9c9e37adf4
comparison
equal deleted inserted replaced
522:fd4208f8b5f3 523:0717bcc4f2b7
1911 1911
1912 /* default layout */ 1912 /* default layout */
1913 1913
1914 layout_config_parse(options->layout.style, options->layout.order, 1914 layout_config_parse(options->layout.style, options->layout.order,
1915 &lw->dir_location, &lw->file_location, &lw->image_location); 1915 &lw->dir_location, &lw->file_location, &lw->image_location);
1916 lw->dir_view_type = options->layout.dir_view_type; 1916 lw->dir_view_type = CLAMP(options->layout.dir_view_type, 0, VIEW_DIR_TYPES_COUNT - 1);
1917 lw->icon_view = options->layout.view_as_icons; 1917 lw->icon_view = options->layout.view_as_icons;
1918 1918
1919 /* divider positions */ 1919 /* divider positions */
1920 1920
1921 if (options->layout.save_window_positions) 1921 if (options->layout.save_window_positions)