Bug 681333 - Check MakeCurrent return code on init; r=jmuizelaar

This commit is contained in:
Benoit Girard 2011-08-31 07:27:05 -07:00
parent 7c854d8e84
commit ccdacc69a0

View File

@ -135,6 +135,7 @@ public:
#endif
#include "gfxUtils.h"
#include "gfxFailure.h"
#include "gfxASurface.h"
#include "gfxImageSurface.h"
#include "gfxPlatform.h"
@ -708,7 +709,13 @@ public:
return PR_FALSE;
}
MakeCurrent();
PRBool current = MakeCurrent();
if (!current) {
gfx::LogFailure(NS_LITERAL_CSTRING(
"Couldn't get device attachments for device."));
return PR_FALSE;
}
PRBool ok = InitWithPrefix("gl", PR_TRUE);
#if 0
if (ok) {