X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain_test.cpp;h=32beb41b45df0c4e67c7490f884f3581eb2b2963;hp=d79c933431cdaa2d8c5f78924a970748a3f66fa4;hb=e766478d4a236074000a6a17be9cba6e8b1576f3;hpb=419bbfe5e46add3df115882dbf489ccfe080d2f9 diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index d79c933..32beb41 100644 --- a/effect_chain_test.cpp +++ b/effect_chain_test.cpp @@ -951,7 +951,7 @@ TEST(EffectChainTest, SameInputsGiveSameOutputs) { 0.0f, 0.0f, 0.0f, 0.0f, }; - float out_data[2 * 2]; + float out_data[4 * 3]; EffectChainTester tester(NULL, 4, 3); // Note non-square aspect. @@ -1248,7 +1248,12 @@ TEST(EffectChainTest, StringStreamLocalesWork) { // the test will always succeed. Note that the OpenGL driver might call // setlocale() behind-the-scenes, and that might corrupt the returned // pointer, so we need to take our own copy of it here. - char *saved_locale = strdup(setlocale(LC_ALL, "nb_NO.UTF_8")); + char *saved_locale = setlocale(LC_ALL, "nb_NO.UTF_8"); + if (saved_locale == NULL) { + // The locale wasn't available. + return; + } + saved_locale = strdup(saved_locale); float data[] = { 0.0f, 0.0f, 0.0f, 0.0f, };