You will get that error if you are trying to rasterize into an output raster that doesn't exist.
C:\Temp>dir /b test.tif
File Not Found
C:\Temp>gdal_rasterize -b 1 -burn 255 test.shp test.tif
ERROR 10: Pointer 'hDS' is NULL in 'GDALGetProjectionRef'.
Warning 1: The input vector layer has a SRS, but the output raster dataset SRS is unknown.
Ensure output raster dataset has the same SRS, otherwise results might be incorrect.
If you want GDAL to create your output raster for you, you need to specify the output extent and pixel size.
Something like:
ogrinfo -so test.shp test
INFO: Open of `test.shp'
using driver `ESRI Shapefile' successful.
Layer name: test
Metadata:
DBF_DATE_LAST_UPDATE=2016-12-21
Geometry: Polygon
Feature Count: 3
Extent: (-107.098004, 41.168652) - (-104.171267, 44.190567)
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137.0,298.257223563]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]]
OID_: Integer (9.0)
gdal_rasterize -te -107.2, 41.0, -104.1, 44.2 -tr 0.01 0.01 -burn 255 test.shp test.tif