Skip to content

Commit

Permalink
src: Fix crash on load
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Coval <[email protected]>
Change-Id: Ieb76a5a9f15f6689dd5abb901cdaf911a6a2192c
  • Loading branch information
rzr committed Aug 7, 2020
1 parent 7b738e4 commit 8ee41d3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions data/gnu/ModuleGnu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
*/
class GnuBehavior : public Behavior {
public:
GnuBehavior() : Behavior() {
GnuBehavior() : Behavior(),
m_iMultiplier{}
{
char name[32];
//this->clear();
Loader * loader = Loader::getInstance();
Expand Down Expand Up @@ -671,11 +673,13 @@ class GnuBehavior : public Behavior {
SendSignal( m_sigLockArrowBlink[i][1], 0, this->getParent(), NULL );
}
ElseOnSignal( PBL_SIG_BALL_ON ) {
Table * table = Table::getInstance();
for (int i = 0; i < MAX_BALL; i++)
{
BallGroup *ballgroup = table->getBall(i);
ballgroup->getShape3D(0)->setColor(1, 1, 1, 1);
Table * table = Table::getInstance();
for (int i = 0; i < MAX_BALL; i++) {
Shape3D * shape = NULL;
BallGroup * group = NULL;
if (table) group = table->getBall(i);
if (group) shape = group->getShape3D(0);
if (shape) shape->setColor(1, 1, 1, 1);
}
}
ElseOnSignal( m_sigFreeballTarget) {
Expand Down

1 comment on commit 8ee41d3

@rzr
Copy link
Collaborator Author

@rzr rzr commented on 8ee41d3 Dec 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.