Changeset 72c210f


Ignore:
Timestamp:
Mar 25, 2007, 12:53:11 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
f60f02c
Parents:
91bf213
git-author:
Nelson Elhage <nelhage@mit.edu> (03/25/07 12:52:38)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/25/07 12:53:11)
Message:
Let's not segfault if the user asks for a nonexistant style in .owl/startup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r0337203 r72c210f  
    397397
    398398  owl_function_debugmsg("startup: set style for the view: %s", owl_global_get_default_style(&g));
    399   owl_view_set_style(owl_global_get_current_view(&g),
    400                      owl_global_get_style_by_name(&g, owl_global_get_default_style(&g)));   
     399  s = owl_global_get_style_by_name(&g, owl_global_get_default_style(&g));
     400  if(s)
     401      owl_view_set_style(owl_global_get_current_view(&g), s);
     402  else
     403      owl_function_error("No such style: %s", owl_global_get_default_style(&g));
    401404
    402405  owl_function_debugmsg("startup: setting context interactive");
Note: See TracChangeset for help on using the changeset viewer.