assign-local-private-after-allocating.patch 730 B

12345678910111213141516171819202122232425
  1. From ec2c4ead497133ef20d5ef5a9b481b38e1e0f7a2 Mon Sep 17 00:00:00 2001
  2. From: Peter Hutterer <peter.hutterer@who-t.net>
  3. Date: Mon, 27 Jun 2011 03:13:54 +0000
  4. Subject: Assign local->private after allocating.
  5. It is detrimental to the user experience when the driver tries to derefernce
  6. null pointers.
  7. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  8. ---
  9. diff --git a/src/acecad.c b/src/acecad.c
  10. index ad6d793..604fe91 100644
  11. --- a/src/acecad.c
  12. +++ b/src/acecad.c
  13. @@ -343,6 +343,7 @@ AceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags)
  14. return BadAlloc;
  15. memset(priv, 0, sizeof(AceCadPrivateRec));
  16. + local->private = priv;
  17. local->device_control = DeviceControl;
  18. --
  19. cgit v0.8.3-6-g21f6