drive: Fix possible NULL ptr access
authorMartin Fleisz <martin.fleisz@thincast.com>
Tue, 6 Mar 2018 15:34:36 +0000 (16:34 +0100)
committerMartin Fleisz <martin.fleisz@thincast.com>
Tue, 6 Mar 2018 15:34:36 +0000 (16:34 +0100)
channels/drive/client/drive_main.c

index e100b19..440f9a2 100644 (file)
@@ -788,7 +788,7 @@ static void* drive_thread_func(void* arg)
        }
 
 fail:
-       if (error && drive->rdpcontext)
+       if (error && drive && drive->rdpcontext)
                setChannelError(drive->rdpcontext, error, "drive_thread_func reported an error");
 
        ExitThread((DWORD)error);