2 suggestions:
if you know the dimensions of the image (300x300 for example), you can call the allocate() method explicitly before loading the texture:
floor.allocate( 300, 300, GL_RGB );
you could also check for the loading/allocation in the draw method:
if(floor.isAllocated()){
floor.draw(x,y,1)
}
cheers!