Fixed undefined behavior in wf_peer_main_loop function
Undefined behavior on "wfPeerContext *context", as it is accessed before being initialized or assigned. Fixed.
@@ -279,11 +279,11 @@ DWORD WINAPI wf_peer_main_loop(LPVOID lpParam)
if (!client->Initialize(client))
goto fail_client_initialize;
+ context = (wfPeerContext*) client->context;
+
if (context->socketClose)
goto fail_socked_closed;
- context = (wfPeerContext*) client->context;
-
wfi = context->info;
if (wfi->input_disabled)
