Problem with clone hgeSprite
  • TrilinXTrilinX June 2011
    Hi, All!
    I have some question.
    Why can SpriteFish have NULL value, if FishOriginal is not NULL in this code:

    typedef struct TFish
    {
    hgeSprite *SpriteFish;
    TFish()
    :
    SpriteFish(NULL)
    {}

    void SetSprite(hgeSprite* FishOriginal)
    {
    if(FishOriginal != NULL)
    SpriteFish = new hgeSprite(*FishOriginal);
    }
    }*PFish;

    It has very strange, because when I compiler exe on debug machine It's all right.
  • You have not provided enough code for us to tell what's going on.
  • evilsquareevilsquare July 2011
    try "Clean Solution" + "Rebuild Solution" or memcpy )
  • kvakvskvakvs July 2011
    You zero SpriteFish in c-tor, but set it in SetSprite.
    Probably SetSprite was not called for some reason, so it remained NULL.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion

Who's Online (0)