Crash fixes

A new commit because my ISP stopped being douche bags and let me port
forward so I could run H@H.

There were 2 crashes when I tried to run it, 1 because of exceptions
being thrown in the constructor of the main window, and the other in the
processing of the gallery search html.