uifw/ganes/src/HgVgHelper.cpp
branchRCL_3
changeset 59 978afdc0236f
parent 56 d48ab3b357f1
child 64 85902f042028
--- a/uifw/ganes/src/HgVgHelper.cpp	Wed Sep 01 12:16:19 2010 +0100
+++ b/uifw/ganes/src/HgVgHelper.cpp	Tue Sep 14 21:48:24 2010 +0300
@@ -20,6 +20,7 @@
 #include "HgVgHelper.h"
 #include "HgVgDrawBuffer.h"
 #include "HgVgImageCreator.h"
+#include "HgVgEgl.h"
 
 #include <e32math.h>
 #include <gulicon.h>
@@ -107,7 +108,9 @@
 //     
 VGImage CreateVgImageFromIconL(const CGulIcon& aIcon)
     {
-        
+    // If egl has not been initialized we aren't allowed to create vgimages.
+    if (!CHgVgEGL::EglInitialized()) return VG_INVALID_HANDLE;
+    
     CFbsBitmap* bitmap = aIcon.Bitmap();
     User::LeaveIfNull(bitmap);
     CFbsBitmap* mask = aIcon.Mask();