nvpro-samples / nvpro_core

shared source code and resources needed for the samples to run

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Runtime exception when assign `nullptr` to `std::string`

wqycg opened this issue · comments

VS2022 Version 17.5.3.

Call from gl_vk_bk3dthreaded.

// nvpro_core/nvh/profiler.cpp

Profiler::SectionID Profiler::beginSection(const char* name, const char* api, gpuTimeProvider_fn gpuTimeProvider, bool singleShot)
{
  // ...
  if(entry.name != name || entry.api != api || entry.level != level)
  {
    entry.name = name;
    entry.api  = api;
    //...
  }
}

entry.api = api throws exception, api == nullptr.