Skip to content

Crash with dispatcher update #1035

Closed Answered by skypjack
rudiHammad asked this question in Q&A
Discussion options

You must be logged in to vote

Well, in this specific example you have a trivial error actually. Just replace this:

    DamageSystem(entt::registry *registry) {
        registry = registry;
    }

With the following:

    DamageSystem(entt::registry *registry)
        : registry{registry}
    {}

In the first case, you aren't initializing the registry data member and this explains the crash.
No idea if it's also the same error as in you real world code. 🤷‍♂️

Replies: 7 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@skypjack
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@skypjack
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@skypjack
Comment options

Answer selected by rudiHammad
Comment options

You must be logged in to vote
1 reply
@skypjack
Comment options

Comment options

You must be logged in to vote
1 reply
@skypjack
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants