Segmentation fault when loading texture using SOIL

Hi all, I’m having some problem in using SOIL library with SOIL_load_OGL_texture function, here is my code:


bool TextureManager::load(const std::string &filePath, GLint internalFormat, GLenum format, GLenum type) {

    textureObj_ = SOIL_load_OGL_texture(
          filePath.c_str(),
          SOIL_LOAD_AUTO,
          SOIL_CREATE_NEW_ID,
          SOIL_FLAG_INVERT_Y
          );

    if(textureObj_ == 0)
        return false;

    // Typical Texture Generation Using Data From The Bitmap
    glBindTexture(GL_TEXTURE_2D, textureObj_);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);

    return true;                                        // Return Success
}

but I’m getting a SEGFAULT, I found a post of a guy that had my same problem but I can’t understand what I’ve to do to solve, here is his post:
http://www.gamedev.net/topic/659268-segmentation-fault-when-loading-texture-using-soil/

Thank you in advance.
Daniele