changeset 6959:9e934742a081

Fix build broken by RT-34884 (declared var inside for statement - it build locally but fails on the hudson server)
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Thu, 01 May 2014 09:52:14 -0700
parents 686ac8b65d29
children 9fb43da24248
files modules/graphics/src/main/native-font/dfontdecoder.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/native-font/dfontdecoder.c	Thu May 01 09:06:27 2014 -0700
+++ b/modules/graphics/src/main/native-font/dfontdecoder.c	Thu May 01 09:52:14 2014 -0700
@@ -58,8 +58,9 @@
     CFArrayRef fonts = CTFontCollectionCreateMatchingFontDescriptors(collection);
     CFRelease(collection);
     CFIndex count = CFArrayGetCount(fonts);
-    for (CFIndex i = 0; i < count && descriptor == NULL; i++) {
-        CTFontDescriptorRef fd = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fonts, i);
+    CFIndex i = 0;
+    while (i < count && descriptor == NULL) {
+        CTFontDescriptorRef fd = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fonts, i++);
         if (fd) {
             CFStringRef fdNameRef = CTFontDescriptorCopyAttribute(fd, kCTFontDisplayNameAttribute);
             if (fdNameRef) {