Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Getting an invalid pointer error while using sf::Text  (Read 2145 times)

0 Members and 1 Guest are viewing this topic.

Sub

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Getting an invalid pointer error while using sf::Text
« on: October 17, 2012, 03:06:47 am »
This is slightly odd.

I just switched from Visual Studio 2010 to 2012 Express. 

In 2012 I'm getting runtime errors whenever I assign an sf::Text both a font and a string.  If I assign one without the other, it will work fine.  I can assign character size, color, and position without any problem, but those two functions together are giving me a debug assertion failed error.  It says Expression: invalid null pointer.

I'm declaring the texts in a class and assigning the font and string in the constructor.  The same exact code in 2010 produces no errors, and I've double checked -- I'm using the same library files, they're the debug libraries for SFML 2.

I imagine that I'm doing something wrong to cause the problem, but I have no idea what that would be.  Any help would be appreciated.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Getting an invalid pointer error while using sf::Text
« Reply #1 on: October 17, 2012, 07:41:12 am »
Have you recompiled SFML for VS 2012?
Laurent Gomila - SFML developer