Add an assert to check that sws_getContext() succeeded.