[564] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

[D-O-H] r681 - / branches/par

daemon@ATHENA.MIT.EDU (nelhage@MIT.EDU)
Thu Oct 29 18:07:28 2009

Resent-From: nelhage@mit.edu
Resent-To: barnowl-dev-mtg@charon.mit.edu
To: dirty-owl-hackers@mit.edu
From: nelhage@MIT.EDU
Reply-to: dirty-owl-hackers@MIT.EDU
Date: Sun, 25 Mar 2007 12:53:11 -0400 (EDT)

Author: nelhage
Date: 2007-03-25 12:53:11 -0400 (Sun, 25 Mar 2007)
New Revision: 681

Modified:
   /
   branches/par/owl.c
Log:
 r20653@phanatique:  nelhage | 2007-03-25 12:52:38 -0400
 Let's not segfault if the user asks for a nonexistant style in .owl/startup
 



Property changes on: 
___________________________________________________________________
Name: svk:merge
   - 6122c8b4-0e12-0410-9533-8bcd7c66c992:/local/dirty-owl-hacks:24493
6aa88b72-b502-0410-8cb4-a5dd0230fb79:/owl-local:1356
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/barnowl:20650
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h:18636
   + 6122c8b4-0e12-0410-9533-8bcd7c66c992:/local/dirty-owl-hacks:24493
6aa88b72-b502-0410-8cb4-a5dd0230fb79:/owl-local:1356
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/barnowl:20653
bb873fd7-8e23-0410-944a-99ec44c633eb:/local/d-o-h:18636

Modified: branches/par/owl.c
===================================================================
--- branches/par/owl.c	2007-03-25 16:53:07 UTC (rev 680)
+++ branches/par/owl.c	2007-03-25 16:53:11 UTC (rev 681)
@@ -396,8 +396,11 @@
   }
 
   owl_function_debugmsg("startup: set style for the view: %s", owl_global_get_default_style(&g));
-  owl_view_set_style(owl_global_get_current_view(&g), 
-		     owl_global_get_style_by_name(&g, owl_global_get_default_style(&g)));   
+  s = owl_global_get_style_by_name(&g, owl_global_get_default_style(&g));
+  if(s)
+      owl_view_set_style(owl_global_get_current_view(&g), s);
+  else
+      owl_function_error("No such style: %s", owl_global_get_default_style(&g));
 
   owl_function_debugmsg("startup: setting context interactive");
   owl_context_set_interactive(owl_global_get_context(&g));


home help back first fref pref prev next nref lref last post