gnome-games r8659 - trunk/gnometris
- From: jclinton svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8659 - trunk/gnometris
- Date: Thu, 5 Feb 2009 22:48:51 +0000 (UTC)
Author: jclinton
Date: Thu Feb 5 22:48:51 2009
New Revision: 8659
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8659&view=rev
Log:
Fix uninitialized backgroundImage pointer to prevent crash.
Also make the function signature for resize correct.
Modified:
trunk/gnometris/blockops.cpp
trunk/gnometris/blockops.h
Modified: trunk/gnometris/blockops.cpp
==============================================================================
--- trunk/gnometris/blockops.cpp (original)
+++ trunk/gnometris/blockops.cpp Thu Feb 5 22:48:51 2009
@@ -66,12 +66,13 @@
BlockOps::BlockOps() :
background(NULL),
foreground(NULL),
- blocknr (0),
- rot (0),
- color (0)
+ renderer(NULL),
+ blocknr(0),
+ rot(0),
+ color(0),
+ backgroundImage(NULL)
{
field = new Block*[COLUMNS];
- renderer = NULL;
themeID = -1;
posx = COLUMNS / 2;
@@ -420,7 +421,7 @@
}
gboolean
-BlockOps::resize(GtkWidget *widget, GdkEventConfigure *event, BlockOps *field)
+BlockOps::resize(GtkWidget *widget, GtkAllocation *event, BlockOps *field)
{
field->width = field->w->allocation.width;
field->height = field->w->allocation.height;
Modified: trunk/gnometris/blockops.h
==============================================================================
--- trunk/gnometris/blockops.h (original)
+++ trunk/gnometris/blockops.h Thu Feb 5 22:48:51 2009
@@ -119,7 +119,7 @@
static gboolean configure (GtkWidget * widget, GdkEventConfigure * event,
BlockOps * field);
- static gboolean resize (GtkWidget * widget, GdkEventConfigure * event,
+ static gboolean resize (GtkWidget * widget, GtkAllocation * event,
BlockOps * field);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]