message: Handle null sampler
diff: @@ -910,19 +910,23 @@ void writeImage(std::string& json, std::vector<BufferView>& views, const cgltf_i
  void writeTexture(std::string& json, const cgltf_texture& texture, cgltf_data* data, const Settings& settings)
  {
  if (texture.image)
  + {
  + if (texture.sampler)
  {
  append(json, "\"sampler\":");
  append(json, size_t(texture.sampler - data->samplers));
  + append(json, ",");
  + }
  if (settings.texture_ktx2)
  {
  - append(json, ",\"extensions\":{\"KHR_texture_basisu\":{\"source\":");
  + append(json, "\"extensions\":{\"KHR_texture_basisu\":{\"source\":");
  append(json, size_t(texture.image - data->images));
  append(json, "}}");
  }
  else
  {
  - append(json, ",\"source\":");
  + append(json, "\"source\":");
  append(json, size_t(texture.image - data->images));
  }
  }
  