Skip to content

Commit

Permalink
[host] windows: fix crash on failure to init a capture interface
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Mar 9, 2024
1 parent d5b3222 commit da82076
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions host/src/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,10 +894,10 @@ int app_main(int argc, char * argv[])
CaptureInterface * iface = NULL;
for(int i = 0; CaptureInterfaces[i]; ++i)
{
iface = CaptureInterfaces[i];
if (*ifaceName && strcasecmp(ifaceName, iface->shortName))
if (*ifaceName && strcasecmp(ifaceName, CaptureInterfaces[i]->shortName))
continue;

iface = CaptureInterfaces[i];
DEBUG_INFO("Trying : %s", iface->getName());

if (!iface->create(
Expand Down Expand Up @@ -1066,6 +1066,7 @@ int app_main(int argc, char * argv[])
stopThreads();
captureStop();
app.iface->free();

LG_LOCK_FREE(app.pointerLock);

fail_lgmp:
Expand Down

0 comments on commit da82076

Please sign in to comment.