Nux

Merge lp:~unity-team/nux/nux.null-pointer-exceptions into lp:nux

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Jay Taoko
Approved revision: 686
Merged at revision: 685
Proposed branch: lp:~unity-team/nux/nux.null-pointer-exceptions
Merge into: lp:nux
Diff against target: 24 lines (+8/-0)
1 file modified
NuxGraphics/IOpenGLGLSLShader.cpp (+8/-0)
To merge this branch: bzr merge lp:~unity-team/nux/nux.null-pointer-exceptions
Reviewer Review Type Date Requested Status
Jay Taoko (community) Approve
jenkins continuous-integration Pending
Review via email: mp+128935@code.launchpad.net

Commit message

It fixes two null pointer exceptions found when running nux playground examples. There might be similar problems elsewhere!

Description of the change

It fixes two null pointer exceptions found when running nux playground examples. There might be similar problems elsewhere!

To post a comment you must log in.
Revision history for this message
Jay Taoko (jaytaoko) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NuxGraphics/IOpenGLGLSLShader.cpp'
2--- NuxGraphics/IOpenGLGLSLShader.cpp 2012-09-30 16:35:58 +0000
3+++ NuxGraphics/IOpenGLGLSLShader.cpp 2012-10-10 13:35:23 +0000
4@@ -515,6 +515,10 @@
5 ObjectPtr<IOpenGLVertexShader> vs = GetGraphicsDisplay()->GetGpuDevice()->CreateVertexShader(); //new IOpenGLVertexShader;
6
7 std::string ProcessedShaderSource;
8+ if(!VtxShaderPreprocessorDefines)
9+ {
10+ VtxShaderPreprocessorDefines = "";
11+ }
12 std::string Defines(VtxShaderPreprocessorDefines);
13 InsertPreProcessorDefinitions(glslshader, ProcessedShaderSource, Defines);
14
15@@ -530,6 +534,10 @@
16 ObjectPtr<IOpenGLPixelShader> ps = GetGraphicsDisplay()->GetGpuDevice()->CreatePixelShader(); //new IOpenGLPixelShader;
17
18 std::string ProcessedShaderSource;
19+ if (!FrgShaderPreprocessorDefines)
20+ {
21+ FrgShaderPreprocessorDefines = "";
22+ }
23 std::string Defines(FrgShaderPreprocessorDefines);
24 InsertPreProcessorDefinitions(glslshader, ProcessedShaderSource, Defines);
25

Subscribers

People subscribed via source and target branches