Pārlūkot izejas kodu

Fixed crash at shutdown with new hashtable code

Sam Lantinga 6 mēneši atpakaļ
vecāks
revīzija
de12cb92dc
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/camera/SDL_camera.c

+ 1 - 1
src/camera/SDL_camera.c

@@ -1397,7 +1397,7 @@ void SDL_QuitCamera(void)
 // Physical camera objects are only destroyed when removed from the device hash.
 // Physical camera objects are only destroyed when removed from the device hash.
 static void SDLCALL DestroyCameraHashItem(void *userdata, const void *key, const void *value)
 static void SDLCALL DestroyCameraHashItem(void *userdata, const void *key, const void *value)
 {
 {
-    SDL_Camera *device = (SDL_Camera *) userdata;
+    SDL_Camera *device = (SDL_Camera *) value;
     ClosePhysicalCamera(device);
     ClosePhysicalCamera(device);
     camera_driver.impl.FreeDeviceHandle(device);
     camera_driver.impl.FreeDeviceHandle(device);
     SDL_DestroyMutex(device->lock);
     SDL_DestroyMutex(device->lock);