mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
- added null test on currentRaster avoiding plugin to crash when no raster has been loaded
This commit is contained in:
parent
b7d4ae4351
commit
e10769ff6c
@ -519,7 +519,7 @@ bool DecorateRasterProjPlugin::initShaders( std::string &logs )
|
||||
|
||||
|
||||
bool DecorateRasterProjPlugin::startDecorate( QAction *act,
|
||||
MeshDocument & /*m*/,
|
||||
MeshDocument & m,
|
||||
RichParameterSet * /*par*/,
|
||||
GLArea * /*gla*/ )
|
||||
{
|
||||
@ -527,6 +527,11 @@ bool DecorateRasterProjPlugin::startDecorate( QAction *act,
|
||||
{
|
||||
case DP_PROJECT_RASTER:
|
||||
{
|
||||
if (m.rm() == NULL)
|
||||
{
|
||||
qWarning("No valid raster has been loaded.");
|
||||
return false;
|
||||
}
|
||||
glPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
|
||||
GLenum err = glewInit();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user