[haiku-commits] r40885 - haiku/trunk/src/servers/app

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 8 Mar 2011 22:47:57 +0100 (CET)

Author: stippi
Date: 2011-03-08 22:47:57 +0100 (Tue, 08 Mar 2011)
New Revision: 40885
Changeset: http://dev.haiku-os.org/changeset/40885

Modified:
   haiku/trunk/src/servers/app/ServerFont.cpp
Log:
Duh, of course fStyle can be NULL in SetStyle(), which is for example
called from the constructors...


Modified: haiku/trunk/src/servers/app/ServerFont.cpp
===================================================================
--- haiku/trunk/src/servers/app/ServerFont.cpp  2011-03-08 21:36:35 UTC (rev 
40884)
+++ haiku/trunk/src/servers/app/ServerFont.cpp  2011-03-08 21:47:57 UTC (rev 
40885)
@@ -244,7 +244,8 @@
 {
        if (style && style != fStyle) {
                // detach from old style
-               fStyle->Release();
+               if (fStyle != NULL)
+                       fStyle->Release();
 
                // attach to new style
                fStyle = style;


Other related posts:

  • » [haiku-commits] r40885 - haiku/trunk/src/servers/app - superstippi