*/}}
YimingWu hai 3 meses
pai
achega
f7bf9ce697
Modificáronse 1 ficheiros con 7 adicións e 5 borrados
  1. 7 5
      resources/la_widgets_viewers.c

+ 7 - 5
resources/la_widgets_viewers.c

@@ -1018,11 +1018,13 @@ int OPINV_3DOr2DViewAdjust(laOperator *a, laEvent *e){
     if(a->Type->Modal == OPMOD_CanvasMove && a->This->EndInstance){
         laCanvasExtra* cex=a->This->EndInstance;
         char* str=strGetArgumentString(a->ExtraInstructionsP,"pan");
-        if(strSame(str,"left")){ cex->PanX -= (LA_RH) * cex->ZoomX; }
-        elif(strSame(str,"right")){ cex->PanX += (LA_RH) * cex->ZoomX; }
-        elif(strSame(str,"up")){ cex->PanY += (LA_RH) * cex->ZoomY; }
-        elif(strSame(str,"down")){ cex->PanY -= (LA_RH) * cex->ZoomY; }
-        return LA_FINISHED;
+        if(str){
+            if(strSame(str,"left")){ cex->PanX -= (LA_RH) * cex->ZoomX; }
+            elif(strSame(str,"right")){ cex->PanX += (LA_RH) * cex->ZoomX; }
+            elif(strSame(str,"up")){ cex->PanY += (LA_RH) * cex->ZoomY; }
+            elif(strSame(str,"down")){ cex->PanY -= (LA_RH) * cex->ZoomY; }
+            return LA_FINISHED;
+        }
     }
 
     return LA_RUNNING;