title: Segfault when drawing text with SFML
body: <p>I have made a <code>Button</code> class that should draw some vertices and a string to a <code>RenderWindow</code>. Here's the code with irrelevant pieces snipped out: (<a href="http://pastebin.com/4a5RuS2y" rel="nofollow">here</a> is the full code)</p>
  
  <pre class="lang-c prettyprint-override"><code>namespace game {
  
  class Button
  {
  public:
      Button(int _x, int _y, int _width, int _height, std::string text)
      {
          ...
  
          sf::Font font;
          font.loadFromFile("res/SF Intermosaic B.ttf");
          label.setFont(font);
          label.setString(text);
          label.setCharacterSize(16);
          label.setColor(sf::Color(20, 20, 20));
  
          ...
      }
  
      ...
  
      void draw(sf::RenderWindow&amp; window) const
      {
          sf::RenderStates states;
          states.texture = &amp;texture;
  
          window.draw(vertices[state], states);
          window.draw(label); // If this line is commented out, there's no error.
      }
  
  private:
      ...
  
      sf::Text label;
  
      ...
  };
  
  }
  </code></pre>
  
  <p>But when I draw the text, the program compiles just fine, but when I run it, it instantly crashes.</p>
  
  <p>Here is the backtrace from gdb:</p>
  
  <pre><code>#0  0x00007ffff7bad604 in sf::Font::getTexture(unsigned int) const () from /usr/local/lib/libsfml-graphics.so.2
  #1  0x00007ffff7bcd626 in sf::Text::draw(sf::RenderTarget&amp;, sf::RenderStates) const () from /usr/local/lib/libsfml-graphics.so.2
  #2  0x00007ffff7bc5bf4 in sf::RenderTarget::draw(sf::Drawable const&amp;, sf::RenderStates const&amp;) () from /usr/local/lib/libsfml-graphics.so.2
  #3  0x00000000004033ad in game::Button::draw(sf::RenderWindow&amp;) const ()
  #4  0x0000000000403b64 in game::Menu::draw(sf::RenderWindow&amp;) const ()
  #5  0x00000000004042c5 in game::State::draw() ()
  #6  0x0000000000402b4d in main ()
  </code></pre>
  
  <p>How would I solve this?</p>