Added null check

Don't dereference "handle" if it's NULL.

Bug 13348578

Change-Id: Ifa6758616c41cf84467af6db29c779d26901a01c
diff --git a/libs/ui/GraphicBuffer.cpp b/libs/ui/GraphicBuffer.cpp
index 96a7188..c4e4efa 100644
--- a/libs/ui/GraphicBuffer.cpp
+++ b/libs/ui/GraphicBuffer.cpp
@@ -235,8 +235,10 @@
 
     buffer = reinterpret_cast<void*>(static_cast<int*>(buffer) + sizeNeeded);
     size -= sizeNeeded;
-    fds += handle->numFds;
-    count -= handle->numFds;
+    if (handle) {
+        fds += handle->numFds;
+        count -= handle->numFds;
+    }
 
     return NO_ERROR;
 }