{"action":"created","issue":{"url":"https://api.github.com/repos/tojocky/node-printer/issues/49","labels_url":"https://api.github.com/repos/tojocky/node-printer/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/tojocky/node-printer/issues/49/comments","events_url":"https://api.github.com/repos/tojocky/node-printer/issues/49/events","html_url":"https://github.com/tojocky/node-printer/issues/49","id":59646376,"number":49,"title":"cupsGetDefault2 can return NULL","user":{"login":"lbast2","id":11295325,"avatar_url":"https://avatars.githubusercontent.com/u/11295325?v=3","gravatar_id":"","url":"https://api.github.com/users/lbast2","html_url":"https://github.com/lbast2","followers_url":"https://api.github.com/users/lbast2/followers","following_url":"https://api.github.com/users/lbast2/following{/other_user}","gists_url":"https://api.github.com/users/lbast2/gists{/gist_id}","starred_url":"https://api.github.com/users/lbast2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbast2/subscriptions","organizations_url":"https://api.github.com/users/lbast2/orgs","repos_url":"https://api.github.com/users/lbast2/repos","events_url":"https://api.github.com/users/lbast2/events{/privacy}","received_events_url":"https://api.github.com/users/lbast2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-03T14:10:49Z","updated_at":"2015-03-03T18:15:41Z","closed_at":null,"body":"If CUPS server has no default printer defined, cupsGetDefault2 return NULL instead of empty string.\r\n\r\nWorkaround: in node_printer_posix.cc\r\n\r\nMY_NODE_MODULE_CALLBACK(getDefaultPrinterName)\r\n{\r\n    MY_NODE_MODULE_HANDLESCOPE;\r\n    const char * defaultDest = cupsGetDefault2(CUPS_HTTP_DEFAULT);\r\n    if( defaultDest == NULL ) { \r\n      defaultDest = \"\";\r\n   }\r\n    MY_NODE_MODULE_RETURN_VALUE(V8_STRING_NEW_UTF8(defaultDest));\r\n}\r\n"},"comment":{"url":"https://api.github.com/repos/tojocky/node-printer/issues/comments/77001846","html_url":"https://github.com/tojocky/node-printer/issues/49#issuecomment-77001846","issue_url":"https://api.github.com/repos/tojocky/node-printer/issues/49","id":77001846,"user":{"login":"tojocky","id":598809,"avatar_url":"https://avatars.githubusercontent.com/u/598809?v=3","gravatar_id":"","url":"https://api.github.com/users/tojocky","html_url":"https://github.com/tojocky","followers_url":"https://api.github.com/users/tojocky/followers","following_url":"https://api.github.com/users/tojocky/following{/other_user}","gists_url":"https://api.github.com/users/tojocky/gists{/gist_id}","starred_url":"https://api.github.com/users/tojocky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tojocky/subscriptions","organizations_url":"https://api.github.com/users/tojocky/orgs","repos_url":"https://api.github.com/users/tojocky/repos","events_url":"https://api.github.com/users/tojocky/events{/privacy}","received_events_url":"https://api.github.com/users/tojocky/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T18:15:41Z","updated_at":"2015-03-03T18:15:41Z","body":"Do you have error from native library?\r\nIf it returns null I think it is fine."}}