{"action":"closed","issue":{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1716","repository_url":"https://api.github.com/repos/PointCloudLibrary/pcl","labels_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1716/labels{/name}","comments_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1716/comments","events_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1716/events","html_url":"https://github.com/PointCloudLibrary/pcl/issues/1716","id":176175205,"number":1716,"title":"toPCLPointCloud2 crashes if cloud has no points","user":{"login":"magro11","id":2607303,"avatar_url":"https://avatars.githubusercontent.com/u/2607303?v=3","gravatar_id":"","url":"https://api.github.com/users/magro11","html_url":"https://github.com/magro11","followers_url":"https://api.github.com/users/magro11/followers","following_url":"https://api.github.com/users/magro11/following{/other_user}","gists_url":"https://api.github.com/users/magro11/gists{/gist_id}","starred_url":"https://api.github.com/users/magro11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magro11/subscriptions","organizations_url":"https://api.github.com/users/magro11/orgs","repos_url":"https://api.github.com/users/magro11/repos","events_url":"https://api.github.com/users/magro11/events{/privacy}","received_events_url":"https://api.github.com/users/magro11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-10T11:32:24Z","updated_at":"2016-10-24T11:39:46Z","closed_at":"2016-10-24T11:39:46Z","body":"Dear PCL Team,\r\n\r\nthe method toPCLPointCloud2 (conversion.h) crashes in line 257 if the incoming cloud contains no points:\r\n\r\n`memcpy (&msg.data[0], &cloud.points[0], data_size);`\r\n\r\nsince data_size is 0.\r\n\r\nMy environment: Visual Studio 2013, 64bit, PCL 1.8.0 (current master branch), Win 7.\r\n\r\nWould it be possible, to replace the line by:\r\n\r\n`\r\nif (data_size)\r\n{\r\n    memcpy (&msg.data[0], &cloud.points[0], data_size);\r\n}\r\n`\r\n\r\nCheers\r\nMarc"}}
{"actor":{"display_login":"SergioRAgostinho"}}