What kind of error is it giving you? Its hard to determine what context that piece of code is running in, and when exactly it is failing.