Check nametowindow return value for C_NULL
Merge pull request #81 from JuliaLang/kms/fix_segfault

Check `nametowindow` return value for C_NULL