gnome-games r8662 - trunk/gnometris
- From: jclinton svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8662 - trunk/gnometris
- Date: Thu, 5 Feb 2009 23:18:52 +0000 (UTC)
Author: jclinton
Date: Thu Feb 5 23:18:52 2009
New Revision: 8662
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8662&view=rev
Log:
Fix another possible source of a crashes from uninitialized class values.
This checkin also makes valgrind a lot happier.
Modified:
trunk/gnometris/blockops.cpp
Modified: trunk/gnometris/blockops.cpp
==============================================================================
--- trunk/gnometris/blockops.cpp (original)
+++ trunk/gnometris/blockops.cpp Thu Feb 5 23:18:52 2009
@@ -66,6 +66,10 @@
BlockOps::BlockOps() :
background(NULL),
foreground(NULL),
+ width(0),
+ height(0),
+ cell_width(0),
+ cell_height(0),
renderer(NULL),
themeID(-1),
blocknr(0),
@@ -419,10 +423,10 @@
}
gboolean
-BlockOps::resize(GtkWidget *widget, GtkAllocation *event, BlockOps *field)
+BlockOps::resize(GtkWidget *widget, GtkAllocation *allocation, BlockOps *field)
{
- field->width = field->w->allocation.width;
- field->height = field->w->allocation.height;
+ field->width = allocation->width;
+ field->height = allocation->height;
field->cell_width = field->width/COLUMNS;
field->cell_height = field->height/LINES;
field->rescaleField();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]