瀏覽代碼

Wayland: Cleanup

Camilla Löwy 1 年之前
父節點
當前提交
b35641f4a3
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      src/wl_window.c

+ 7 - 5
src/wl_window.c

@@ -2042,15 +2042,17 @@ static void dataDeviceHandleDrop(void* userData,
         int count;
         char** paths = _glfwParseUriList(string, &count);
         if (paths)
+        {
             _glfwInputDrop(_glfw.wl.dragFocus, count, (const char**) paths);
 
-        for (int i = 0; i < count; i++)
-            _glfw_free(paths[i]);
+            for (int i = 0; i < count; i++)
+                _glfw_free(paths[i]);
 
-        _glfw_free(paths);
-    }
+            _glfw_free(paths);
+        }
 
-    _glfw_free(string);
+        _glfw_free(string);
+    }
 }
 
 static void dataDeviceHandleSelection(void* userData,