mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-07 14:35:48 +00:00
[Coverity] Add proper NULL check before comparison
This commit is contained in:
1 parent
31a06effb6
commit
c9eeef3151
3 files changed
+3
-3
No files matched your search
@@ -1187,7 +1187,7 @@ RENDERDOC_CreateRemoteServerConnection(const char *host, uint32_t port, RemoteSe
|
||||
if(host != NULL && host[0] != '\0')
|
||||
s = host;
|
||||
|
||||
if(!strncmp(host, "adb:", 4))
|
||||
if(host != NULL && !strncmp(host, "adb:", 4))
|
||||
{
|
||||
s = "127.0.0.1";
|
||||
|
||||
|
||||
@@ -707,7 +707,7 @@ extern "C" RENDERDOC_API TargetControl *RENDERDOC_CC RENDERDOC_CreateTargetContr
|
||||
|
||||
bool android = false;
|
||||
|
||||
if(!strncmp(host, "adb:", 4))
|
||||
if(host != NULL && !strncmp(host, "adb:", 4))
|
||||
{
|
||||
android = true;
|
||||
s = "127.0.0.1";
|
||||
|
||||
@@ -477,7 +477,7 @@ extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_EnumerateRemoteTargets(
|
||||
if(host != NULL && host[0] != '\0')
|
||||
s = host;
|
||||
|
||||
if(!strncmp(host, "adb:", 4))
|
||||
if(host != NULL && !strncmp(host, "adb:", 4))
|
||||
{
|
||||
s = "127.0.0.1";
|
||||
|
||||
|
||||
Reference in new issue
Block a user