GOutputStream: Fix a compiler warning
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index cdbe66d..a3ac7ad 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -1148,10 +1148,10 @@
   GTask *task = user_data;
   GError *error = NULL;
 
+  class = G_OUTPUT_STREAM_GET_CLASS (stream);
+
   if (!g_async_result_legacy_propagate_error (res, &error))
     {
-      class = G_OUTPUT_STREAM_GET_CLASS (stream);
-
       class->flush_finish (stream, res, &error);
     }