Usermode/libaxwin4 - Handle demarshal failure
authorJohn Hodge (sonata) <[email protected]>
Thu, 6 Nov 2014 23:12:06 +0000 (07:12 +0800)
committerJohn Hodge (sonata) <[email protected]>
Thu, 6 Nov 2014 23:12:06 +0000 (07:12 +0800)
Usermode/Libraries/libaxwin4.so_src/wm.cpp

index 7ce61e4..3672078 100644 (file)
@@ -127,6 +127,10 @@ extern "C" void *AxWin4_GetWindowBuffer(tAxWin4_Window *Window)
                
                uint64_t handle = response.ReadU64();
                Window->m_fd = _SysUnMarshalFD(handle);
+               if( Window->m_fd == -1 ) {
+                       _SysDebug("AxWin4_GetWindowBuffer: Unable to unmarshal resultant FD (0x%llx)", handle);
+                       return NULL;
+               }
                
                _SysDebug("AxWin4_GetWindowBuffer: %llx = %i", handle, Window->m_fd);
        }

UCC git Repository :: git.ucc.asn.au