[WIN32SS][NTGDI] 'otm' is always non-NULL in epilogue
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Tue, 22 Oct 2019 00:29:15 +0000 (09:29 +0900)
committerKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Tue, 22 Oct 2019 00:29:15 +0000 (09:29 +0900)
win32ss/gdi/ntgdi/font.c

index ba51f26..db79c53 100644 (file)
@@ -928,25 +928,24 @@ NtGdiGetOutlineTextMetricsInternalW (HDC  hDC,
       return 0;
   }
   IntGetOutlineTextMetrics(FontGDI, Size, potm);
       return 0;
   }
   IntGetOutlineTextMetrics(FontGDI, Size, potm);
-  if (otm)
+
+  _SEH2_TRY
   {
   {
-     _SEH2_TRY
-     {
-         ProbeForWrite(otm, Size, 1);
-         RtlCopyMemory(otm, potm, Size);
-     }
-     _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-     {
-         Status = _SEH2_GetExceptionCode();
-     }
-     _SEH2_END
+      ProbeForWrite(otm, Size, 1);
+      RtlCopyMemory(otm, potm, Size);
+  }
+  _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+  {
+      Status = _SEH2_GetExceptionCode();
+  }
+  _SEH2_END
 
 
-     if (!NT_SUCCESS(Status))
-     {
-        EngSetLastError(ERROR_INVALID_PARAMETER);
-        Size = 0;
-     }
+  if (!NT_SUCCESS(Status))
+  {
+     EngSetLastError(ERROR_INVALID_PARAMETER);
+     Size = 0;
   }
   }
+
   ExFreePoolWithTag(potm,GDITAG_TEXT);
   return Size;
 }
   ExFreePoolWithTag(potm,GDITAG_TEXT);
   return Size;
 }