Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Segmentation fault when trying to draw sprite[10]
Print
Pages: [
1
]
Author
Topic: Segmentation fault when trying to draw sprite[10] (Read 2125 times)
0 Members and 1 Guest are viewing this topic.
paupav
Full Member
Posts: 156
Segmentation fault when trying to draw sprite[10]
«
on:
November 21, 2015, 03:50:13 am »
i have pointer in second cpp which points to window and when im trying to draw sprite[10] I get segmentation fault.
window->draw(boxS[10]);
Logged
shadowmouse
Sr. Member
Posts: 302
Re: Segmentation fault when trying to draw sprite[10]
«
Reply #1 on:
November 21, 2015, 09:47:44 am »
Please post your code, but as a random guess, is boxS of size 10?
Logged
paupav
Full Member
Posts: 156
Re: Segmentation fault when trying to draw sprite[10]
«
Reply #2 on:
November 23, 2015, 04:09:11 pm »
That was the problem. thanks
it is giving me unexpected behaviour when I'm trying to load texture when number of sprites isn't defined ( sprite[]; ) .
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Segmentation fault when trying to draw sprite[10]
anything